Lua - Tabelle.einfügen funktioniert nicht

Warum nicht t:insert(9) arbeiten in Lua?

(Ich möchte anfügen, die einen Wert von 9 an das Ende der Tabelle)

t = {1,2,3}
table.insert(t, 9)  -- works (appends 9 to end of table t)
t:insert(9)         -- does NOT work

Ich dachte im Allgemeinen

a.f(a,x) ist equalivant zu a:f(x) im Lua

InformationsquelleAutor frooyo | 2011-05-25
Schreibe einen Kommentar