Posted 23 September 2016 - 09:11 PM
hey guys,
I was trying to write a startup-program to make a turtle repeating a program for a specific count of runs.
When I reboot the system, the startup-program works. I can type in how many runs I want the turtle to do but then the error appears.
the error is in line 7 (while Run …) :
attempt to compare number with string expected, got number
All I found about this error here in the forum where mooving based errors.
I tried to fix the problem with an " if "- and "when" - code
I hope you can help me ;-)
btw: I hope the way I made the CODE is ok, I realy don't have a clue how to copy/paste codes from MC to windows ( all I found is this and it doesn't work cause I'm working on an onlineserver and have no file about the codes :(/> )
I was trying to write a startup-program to make a turtle repeating a program for a specific count of runs.
print("general info")
print("general info")
print("")
print("how many runs?")
Runs = io.read()
while Runs > 0 do
shell.run("program")
Runs = (Runs - 1)
end
print("Runs remaining")
shell.run("clear")
print(Runs)
When I reboot the system, the startup-program works. I can type in how many runs I want the turtle to do but then the error appears.
the error is in line 7 (while Run …) :
attempt to compare number with string expected, got number
All I found about this error here in the forum where mooving based errors.
I tried to fix the problem with an " if "- and "when" - code
I hope you can help me ;-)
btw: I hope the way I made the CODE is ok, I realy don't have a clue how to copy/paste codes from MC to windows ( all I found is this and it doesn't work cause I'm working on an onlineserver and have no file about the codes :(/> )
Edited on 23 September 2016 - 11:10 PM