Sorry about my english.
I can’t find my error.
Im improving my game and I use themes to change graphics.
I store the graphics names like this:
[lua]enemy_list = {“2players.png”,“player-ia1.png”,“player-ia2.png”}[/lua]
So, when I will use this graphics, I just use something like that:
[lua]enemy_pic = display.newImageRect(“image/”…theme…"/"…enemy_list[player_num], 320, 150)[/lua]
where THEME is the image directory, and enemy_list is the table above.
My problem is: When I print these values BEFORE call display.newImageRect I have this values:
player_num 1
enemy_list[1] 2players.png
enemy_list[2] player-ia1.png
enemy_list[3] player-ia2.png
BUT, enemy_list[player_num] (using the player_num variable)aways becomes nil
What Im doing wrong?
Thanks for any help! [import]uid: 9133 topic_id: 15678 reply_id: 315678[/import]