This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
TRU3XV3T3R4N's profile picture

attempt to call nil error

Started by TRU3XV3T3R4N, 31 August 2013 - 11:33 AM
TRU3XV3T3R4N #1
Posted 31 August 2013 - 01:33 PM
Title:
attempt to call nil error

I know it has something to do with the variable z but i don't get how to fix it.
http://pastebin.com/Th06uUpC
Bubba #2
Posted 31 August 2013 - 02:06 PM
On line 29 you have this:

z = toNumber(read())

toNumber should not have any capital letters in it because Lua is case sensitive. Use tonumber instead.
TRU3XV3T3R4N #3
Posted 31 August 2013 - 03:09 PM
On line 29 you have this:

z = toNumber(read())

toNumber should not have any capital letters in it because Lua is case sensitive. Use tonumber instead.
Thanks, i'm a bit of a noob at lua.