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

[string "startup"]:10: '=' expected

Started by Mike_Wazowski00, 18 July 2013 - 04:06 PM
Mike_Wazowski00 #1
Posted 18 July 2013 - 06:06 PM
this code isnt finished. The code on startup should say computer label and fuel level <- tested and worked
Then it should Mine 100, Im going to have it come back but that will come when i finish this part
I get the error bios:338: [string "startup"]:10: '=' expected
here is the
code:

–StripMine V1 by Mike_Wazowski00

– Who is this turtle and how much fuel?
L = os.getComputerLabel()
print("I am ", L)
F = turtle.getFuelLevel()
print("I have ", F," Fuel")

– Variables
dist = 0

– Main Code – dig 100
While dist < 100 do
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
dist = dist +1
end
Lyqyd #2
Posted 18 July 2013 - 08:20 PM
Split into new topic.

It's `while`, not `While`.
Mike_Wazowski00 #3
Posted 18 July 2013 - 08:33 PM
Thankyou :)/> Easy Fix I looked over
TheOddByte #4
Posted 20 July 2013 - 05:52 AM
One suggestion, Use a for loop ;)/>

for i = 1,100 do
 turtle.dig()
 turtle.forward()
 turtle.digUp()
 turtle.digDown()
end