Jump to content




Program returning "For Input String:'7.count'"


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

#1 hermanoid

  • Members
  • 15 posts
  • LocationMicroscopic Village in Nebraska.

Posted 07 February 2016 - 10:44 PM

Hi.
I have a program that is made to turn a turtle around to different bordering inventories and craft parts for an item.
It is made up of turtle.turnLeft/right commands, turtle.drop()/dropUp commands, a few variables calculated from the program name stuff (program 5) by using the ... variable, print() functions, and a read() command. there is also an if statement using == to see if the users input is a "y" for yes.

When I execute it (feed 5) it returns the words "For input string: '7.count'" immediately. the first line of code has a print statement "print("begin")" that never prints it's stuff, Which makes me think it's an error.

The words are odd because I happen to have a variable named count, and several "7"'s in my code. However, I think It's a coincidence because when I replace the count variable and the 7's with different names and numbers, the 7.count stays 7.count.

Does anyone know what's happening here?

Hermanoid

PS does anybody know how to get code from turtles to this forum? copy/pasting is impossible.

#2 HDeffo

  • Members
  • 214 posts

Posted 07 February 2016 - 11:05 PM

to upload the code if your server allows http type

pastebin put <filename>

this will upload your file to pastebin.com. just edit your post and link to the paste.

I dont really see much to go on until we can see your code sorry.

Edited by HDeffo, 07 February 2016 - 11:06 PM.


#3 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 07 February 2016 - 11:27 PM

Lua doesn't like variables with numbers in front. This is the error it throws when it finds one.

#4 hermanoid

  • Members
  • 15 posts
  • LocationMicroscopic Village in Nebraska.

Posted 08 February 2016 - 01:57 AM

http://pastebin.com/8Jw3Fb2j


code.

#5 valithor

  • Members
  • 1,053 posts

Posted 08 February 2016 - 03:37 AM

Line 33. You put a period instead of a comma.

Edited by valithor, 08 February 2016 - 03:37 AM.


#6 hermanoid

  • Members
  • 15 posts
  • LocationMicroscopic Village in Nebraska.

Posted 08 February 2016 - 10:07 PM

That's the problem, thank you.

I kinda can't believe I didn't see that

Thanks!
Hermanoid.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users