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

Errors

Started by mdutcher, 27 December 2012 - 04:56 AM
mdutcher #1
Posted 27 December 2012 - 05:56 AM
Hi, i made a little frame machine using redpower and peripherals. I keeps on giving me an error.
Can you help me?
It gives the bois:338 error, its expexting an <eof>
Here's the code:

for i = 1, 90 do
   shell.run("quarry", "Down")
   shell.run("quarry", "Dig")
   end
   if i % 10 == 0 then
	  sleep(10)
   end
end

for 1 = 1, 90 do
   shell.run("quarry", "Up")
end
Lyqyd #2
Posted 27 December 2012 - 05:58 AM
You don't need an end between the second shell.run and the if.
mdutcher #3
Posted 27 December 2012 - 07:16 AM
Thanks
mdutcher #4
Posted 27 December 2012 - 07:19 AM
Its expecting a <name> now, any idea's ?
Lyqyd #5
Posted 27 December 2012 - 07:23 AM
You can't use number constants as variables. Change your second for loop to use a variable rather than one. You can even re-use i.

So, perhaps for i = 1, 90 do instead of for 1 = 1, 90 do.
mdutcher #6
Posted 27 December 2012 - 07:24 AM
My stupid dislexia didn't notice that -.-"