Difference between revisions of "Gamecamp"
From Ghoulwiki
Ghoulsblade (talk | contribs) |
Ghoulsblade (talk | contribs) |
||
Line 11: | Line 11: | ||
* for i=1,10 do ... end | * for i=1,10 do ... end | ||
* if (cond) then ... elseif (cond) then ... else ... end | * if (cond) then ... elseif (cond) then ... else ... end | ||
+ | * for k,v in pairs(mytable) do ... end | ||
+ | * for k,v in ipairs(mytable) do ... end | ||
+ | * function bla:blub () ... end : TODO : implizites self | ||
==== tables ==== | ==== tables ==== | ||
+ | * arrays : table.insert(mytable,o) | ||
+ | * set : mytable[o] = true | ||
* key und value any | * key und value any | ||
* löschen = assign nil | * löschen = assign nil |
Revision as of 11:41, 23 May 2010
- http://www.gamecampmunich.de/sessions/ ! vorschlag eintragen ?
lua intro
- kein int, alles float
- multiple return
- todo : unpack
- for i=1,10 do ... end
- if (cond) then ... elseif (cond) then ... else ... end
- for k,v in pairs(mytable) do ... end
- for k,v in ipairs(mytable) do ... end
- function bla:blub () ... end : TODO : implizites self
tables
- arrays : table.insert(mytable,o)
- set : mytable[o] = true
- key und value any
- löschen = assign nil