Search found 2 matches

by Ihazard
Mon Jan 16, 2012 9:00 pm
Forum: Support and Development
Topic: A loop within a loop
Replies: 7
Views: 2577

Re: A loop within a loop

It says that it has found a nil value in the line of code with the love.graphics.draw: this is the function that it's in, I tried to make it so that instead of looping through my MAPS table it just looked through the first one, but even that won't work.. function DRAW_MAP() if GAME_INPLAY == 1 then ...
by Ihazard
Mon Jan 16, 2012 2:04 pm
Forum: Support and Development
Topic: A loop within a loop
Replies: 7
Views: 2577

A loop within a loop

I'm currently trying to draw tiles for my map but I keep getting an error when I try to do something like: for x = 1, 10 do for y = 1, 10 do if map[x][y] == 1 then love.graphics.draw( tile[1], ( x * tile_w ), ( y * tile_h )) end end end Is using x and y as part of a loop acceptable, I know that it a...