Lua's function example for
object contains an error:1
2
3
4
2
3
4
local objectlist=object(0,"table") for _,id in pairs(objectlist) print id end
It should be like this:
1
2
3
4
2
3
4
local objectlist=object(0,"table") for _,id in pairs(objectlist) do print(id) end
I think it's a good idea when you find some bugs in the reference/write small functions (like DC did) and post them here.
CS2D - Lua reference (bug found)
1 
Offline
palomino
, however
, and in this case, id is a variable, so print id will also fail.