Hi all.
The following code doesn't work -- players don't get drawn.
What am I doing wrong?
Thanks in advance.
Alex
players = {} function make_player(col) local p = {} p.x = 0 p.y = 0 p.color = col return p end function draw_player(p) rectfill(p.x-2,p.y-2,p.x+2,p.y+2,p.color) end function _init() players.home = make_player(1) players.visitor = make_player(8) end function _draw() cls() foreach(players, function(p) draw_player(p)) end |
P#14559 2015-09-24 10:12 ( Edited 2015-09-25 01:57)


P#14601 2015-09-24 19:25 ( Edited 2015-09-24 23:25)
[Please log in to post a comment]