Search found 552 matches

by Tesselode
Sat Jul 24, 2010 2:21 am
Forum: Support and Development
Topic: [solved] Cannot index global variable?
Replies: 2
Views: 425

Re: Cannot index global variable?

Hold on a second; I made a typo. The variable it was complaining about was "player_bullet_x." But adding "player_bullet_x={}" to love.load fixed the problem. So thanks!
by Tesselode
Fri Jul 23, 2010 8:02 pm
Forum: Support and Development
Topic: [solved] Cannot index global variable?
Replies: 2
Views: 425

[solved] Cannot index global variable?

I want to have multiple bullets, so I'm keeping track of them with an index. When I run this: player_bullet_x[player_bullet_amount+1]=player_x I get the following error: main.lua:31: attempt to index global 'player_bullet_index' (a nil value) How can I add an index to a global variable without LOVE ...