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

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

Started by hermanoid, 07 February 2016 - 09:44 PM
hermanoid #1
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.
HDeffo #2
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 on 07 February 2016 - 10:06 PM
KingofGamesYami #3
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.
hermanoid #4
Posted 08 February 2016 - 01:57 AM
http://pastebin.com/8Jw3Fb2j


code.
valithor #5
Posted 08 February 2016 - 03:37 AM
Line 33. You put a period instead of a comma.
Edited on 08 February 2016 - 02:37 AM
hermanoid #6
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.