Modulo:Discendenza/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica
mNessun oggetto della modifica
Riga 9:
local n = 1
local resto = 1
local posiz
local continua = true
local err = '-'
while (args[n]continua) do
posiz = args[n]
if (resto == 0) then
if (posiz) then
if ((tonumber(args[n-3])) and (tonumber(args[n-2]))) then
if (pers[tonumber(args[n-3])]resto == 0) then
err = 'id ' ..if ((tonumber(args[n-3])) ..and ' utilizzato per elementi(tonumber(args[n-2]))) diversi'then
if ((pers[tonumber(args[n-3])) and (tonumber(args[n-2]))) then
err = 'id ' .. args[n-3] .. ' utilizzato per elementi diversi'
else
pers[tonumber(args[n-3])] = { id = tonumber(args[n-3]), padre = tonumber(args[n-2]), testo = args[n-1], nota = args[n], id2 = -1, x = -1, y = -1, sp = 0, figli = {} }
end
else
err = 'identificativo non numerico per il parametro ' .. n
pers[tonumber(args[n-3])] = { id = tonumber(args[n-3]), padre = tonumber(args[n-2]), testo = args[n-1], nota = args[n], id2 = -1, x = -1, y = -1, sp = 0, figli = {} }
end
else
err = 'identificativo non numerico per il parametro ' .. n
end
n = n+1
resto = resto+1
if (resto == 04) then resto = 0 end
else
continua = false
end
n = n+1
resto = resto+1
if (resto == 4) then resto = 0 end
end
if (err == '-' and resto > 0) then