Modulo:Discendenza/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica |
mNessun oggetto della modifica |
||
Riga 5:
local pers = {}
local tabella = {}
local function agg(t)
table.insert(txt,t)
end
local function dividi(dati)
Line 21 ⟶ 26:
if (px) then
if (pers[nx]) then
err = string.format('inserito id = <b>%d
else
pers[nx] = { padre = px, testo = dati[m-1], nota = dati[m], id = -1, x = -1, y = -1, sp = 0, figli = {} }
end
else
err = string.format('inserito id genitore = <b>%s</b> non numerico
end
else
err = string.format('inserito id
end
resto = n-m
end
if (err == '-' and resto > 0) then
err = string.format('numero di dati
end
return err
Line 195 ⟶ 200:
local s1, s2, s3
local xx, xp
▲ local ss = ''
if (allinea == 'destra') then
else
end
local lg = math.floor(100/(xy[1]+2))
Line 248 ⟶ 252:
if (n<xy[2]) then s3 = s3..'</tr>' end
end
if (allinea == 'destra') then
return
end
Line 286 ⟶ 290:
capo = i
else
err = string.format('inseriti più elementi come capostipite (id
end
else
if (v.padre == i) then
err = string.format('
elseif (pers[v.padre]) then
table.insert(pers[v.padre].figli,i)
else
err = string.format('inserito id genitore = <b>%d</b> non valido
end
end
Line 309 ⟶ 313:
calcolaX3(capo, 0)
else
err = '
end
end
|