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

name:15: bad argument: string expected, got nil

Started by ComputerCraftFan11, 30 May 2012 - 10:59 PM
ComputerCraftFan11 #1
Posted 31 May 2012 - 12:59 AM
I was trying to make a program with a little path that follows you but it keeps erroring when i move.

Code:
http://pastebin.com/HaRy5nEN
MysticT #2
Posted 31 May 2012 - 01:08 AM
The problem is here:
minedX = string.sub(mined, 1, string.find("/")-1)
You forgot the first parameter for string.find()

Also on line 16:
minedY = string.sub(mined, string.find("/")+1, string.len(mined))
ComputerCraftFan11 #3
Posted 31 May 2012 - 01:31 AM
The problem is here:
minedX = string.sub(mined, 1, string.find("/")-1)
You forgot the first parameter for string.find()

Also on line 16:
minedY = string.sub(mined, string.find("/")+1, string.len(mined))

Thanks, forgot about that