Jump to content




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


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

#1 Mike_Wazowski00

  • Members
  • 11 posts

Posted 18 July 2013 - 05: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


#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 18 July 2013 - 07:20 PM

Split into new topic.

It's `while`, not `While`.

#3 Mike_Wazowski00

  • Members
  • 11 posts

Posted 18 July 2013 - 07:33 PM

Thankyou :) Easy Fix I looked over

#4 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

Posted 20 July 2013 - 04:52 AM

One suggestion, Use a for loop ;)
for i = 1,100 do
 turtle.dig()
 turtle.forward()
 turtle.digUp()
 turtle.digDown()
end






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users