You are viewing our Forum Archives. To view or take place in current topics click here.
Need Lua Help/Computercraft
Posted:
Need Lua Help/ComputercraftPosted:
Status: Offline
Joined: Jan 02, 201213Year Member
Posts: 232
Reputation Power: 8
Status: Offline
Joined: Jan 02, 201213Year Member
Posts: 232
Reputation Power: 8
I have a small chunk of code that is messing my huge project up and i dont know why it is just this small piece. Here it is.
Im getting bios:206: [string "dig"]:7: '<eof>' expected
Idk what is going wrong. Please post solution, or what im doing wrong
repeat
if turtle.detect() == true then
turtle.dig()
turtle.forward()
end
until
turtle.detect() ~= true
end
Im getting bios:206: [string "dig"]:7: '<eof>' expected
Idk what is going wrong. Please post solution, or what im doing wrong
#2. Posted:
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 3,612
Reputation Power: 173
Status: Offline
Joined: Jul 12, 201014Year Member
Posts: 3,612
Reputation Power: 173
I am not very experienced with LUA, but I am pretty sure you are missing an end keyword. As for where, I am not totally sure. Try this first:
As I don't think you ever ended the repeat statement.
repeat
if turtle.detect() == true then
turtle.dig()
turtle.forward()
end
until
turtle.detect() ~= true
end
end
As I don't think you ever ended the repeat statement.
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Jan 02, 201213Year Member
Posts: 232
Reputation Power: 8
Status: Offline
Joined: Jan 02, 201213Year Member
Posts: 232
Reputation Power: 8
Gah! i already tried that, it still wont work, and im getting very frustrated.
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Jan 02, 201213Year Member
Posts: 232
Reputation Power: 8
Status: Offline
Joined: Jan 02, 201213Year Member
Posts: 232
Reputation Power: 8
Finally, i got it. There is no need for the last end. Thanks for your input.
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.