Page 1 of 1

Help with 'attempt to index global a nil value'

Posted: Sun Jun 14, 2015 9:17 am
by nicksystem
Hey all,

I'm trying to cap the speed of a moving object moving in my game. I'm very new to Love2d.

I keep getting an "attempt to index global a nil value" every method i try.

I've looked at a lot of forum posts on this topic and i'm having trouble understanding the underlying concept.

Attached is a zip with my code (more than 1 lua file). I'd appreciate any help.

Re: Help with 'attempt to index global a nil value'

Posted: Sun Jun 14, 2015 3:13 pm
by HugoBDesigner
I tried your minigame but I couldn't get an error. I also couldn't figure out what I was supposed to do in order to make this error show up or what to do in general. Could you please give us a further explanation of what causes this error? Also, the full text of the error (or screenshot, preferably) would also be much appreciated :)

Re: Help with 'attempt to index global a nil value'

Posted: Wed Jun 17, 2015 5:23 am
by pielago
what is the problem?

Re: Help with 'attempt to index global a nil value'

Posted: Wed Jun 17, 2015 2:16 pm
by Ranguna259
Archive.love works for me, I belive that it's not working the way you want it to work but the program doesn't halt into a "attempt to index global a nil value" error.

Re: Help with 'attempt to index global a nil value'

Posted: Wed Jun 24, 2015 4:38 am
by pielago
I look at your code not sure whats the problem?
hope this helps