Help with 'attempt to index global a nil value'

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
nicksystem
Prole
Posts: 3
Joined: Thu Jun 11, 2015 7:36 am

Help with 'attempt to index global a nil value'

Post 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.
Attachments
speed_assist.zip
(54.73 KiB) Downloaded 251 times
User avatar
HugoBDesigner
Party member
Posts: 403
Joined: Mon Feb 24, 2014 6:54 pm
Location: Above the Pocket Dimension
Contact:

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

Post 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 :)
@HugoBDesigner - Twitter
HugoBDesigner - Blog
pielago
Party member
Posts: 142
Joined: Fri Jun 14, 2013 10:41 am

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

Post by pielago »

what is the problem?
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

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

Post 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.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
pielago
Party member
Posts: 142
Joined: Fri Jun 14, 2013 10:41 am

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

Post by pielago »

I look at your code not sure whats the problem?
hope this helps
Attachments
speed_assist.love
(28.04 KiB) Downloaded 129 times
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 14 guests