4 posts
Posted 13 April 2013 - 12:00 PM
so im trying to create a menu for use with my minecart bank and if i try and move the cursor i get a error on line 111 attempt to get nil , if i try to select the first option i get and error on 118 attempt to index ? (a nil value) i can't seem to find where ive messed up and any help would be greatly appreciated, side note i believe the issue may be lay somewhere in my choice one function
i posted the code on pastebin to preserve the formatting and to make it easier to look at
http://pastebin.com/Kn39Rp2U
1190 posts
Location
RHIT
Posted 13 April 2013 - 12:08 PM
The issue is on line 132, when you call the onKeyPressed function.
onKeyPressed(key, MainMenu)
It should be mainMenu without the capital letter.
4 posts
Posted 13 April 2013 - 12:16 PM
that has fixed my original issue now i come up with 92: attempt to get nill any ideas?
1190 posts
Location
RHIT
Posted 13 April 2013 - 12:18 PM
that has fixed my original issue now i come up with 92: attempt to get nill any ideas?
Capitalization error again. This time on line 16. You put:
printMenu(CartMenu)
CartMenu does not exist, but cartMenu does.
Whenever you get errors that have anything to do with nil values, go back and check spelling, capitalization, etc. I know that I often misspell things and checking anything that could reference that variable generally fixes the problem.
4 posts
Posted 13 April 2013 - 12:23 PM
ok now i feel dumb lol thank you for the help :)/>