Jump to content




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


  • You cannot reply to this topic
2 replies to this topic

#1 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 30 May 2012 - 11:59 PM

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

#2 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 31 May 2012 - 12:08 AM

The problem is here:
minedX = string.sub(mined[i], 1, string.find("/")-1)
You forgot the first parameter for string.find()

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

#3 ComputerCraftFan11

  • Members
  • 771 posts
  • LocationHawaii

Posted 31 May 2012 - 12:31 AM

View PostMysticT, on 31 May 2012 - 12:08 AM, said:

The problem is here:
minedX = string.sub(mined[i], 1, string.find("/")-1)
You forgot the first parameter for string.find()

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

Thanks, forgot about that





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users