Modul:Geo: Unterschied zwischen den Versionen

bessere nil Behandlung
(+ getPLZList() / GetPLZList())
(bessere nil Behandlung)
Zeile 100: Zeile 100:
function p.getPLZList()
function p.getPLZList()
local askResult = mw.smw.ask("[[Kategorie:Postleitzahlen]] [[PLZ::+]]|?#-|mainlabel=-")
local askResult = mw.smw.ask("[[Kategorie:Postleitzahlen]] [[PLZ::+]]|?#-|mainlabel=-")
if askResult == nil then
return
end


local plzTable = {}
local plzTable = {}
for i = 1, #askResult do
if askResult ~= nil then
plzTable[i] = askResult[i][1] -- i-te Zeile, 1. Spalte
for i = 1, #askResult do
plzTable[i] = askResult[i][1] -- i-te Zeile, 1. Spalte
end
end
end