24 posts
Posted 08 April 2013 - 12:15 PM
I've been reading over the Wiki and the forums here and I can't seem to get my Turtles to just do a basic action like Move. Our server does not require turtles to be fueled so I know that is not the issue.My basic code is this:while turtle.detectDown() do
turtle.forward()
end
I'm really confused. I can get it to Turn however. That same code works just fine if I replace turtle.forward with turtle.turnLeft it will turn left forever until I ctrl+t the program. So what am I missing? Is the server configured to not allow move commands? When I go in to the API Mode and do any turtle move commands it returns false.
169 posts
Posted 08 April 2013 - 12:26 PM
I have no idea. Have you asked the server admin why it's not working?
24 posts
Posted 08 April 2013 - 12:34 PM
I have no idea. Have you asked the server admin why it's not working?
Yeah I just sent him a message to see if thats the case.
1511 posts
Location
Pennsylvania
Posted 08 April 2013 - 12:34 PM
I'm going to go out on a limb and ask you this:
Is there a block underneath the turtle?
1190 posts
Location
RHIT
Posted 08 April 2013 - 01:03 PM
I'm going to go out on a limb and ask you this:
Is there a block underneath the turtle?
He says he can replace turtle.forward() with turtle.turnLeft() and it works. So there must be.
My guess is fuel. I know you said that fuel is not enabled, but give it a go anyway. This sounds consistent with that issue, and if you have never managed to get it to go forward then it probably does need fuel.
Otherwise I can think of only two reasons it would not go forward:
1) It is not on top of a block
2) There is a block preventing it from moving or you are standing front of it.
The code itself is perfectly valid.
1214 posts
Location
The Sammich Kingdom
Posted 08 April 2013 - 01:08 PM
The only thing I can think of is either fuel is actually enabled or there is block protection.
The turtle could be in a region that is protected which is preventing the turtle from moving. But that is the only thing I can think of.
1511 posts
Location
Pennsylvania
Posted 08 April 2013 - 01:12 PM
He says he can replace turtle.forward() with turtle.turnLeft() and it works. So there must be.
Pfft, you never know :P/> Turtles have a mind of their own ^_^/>
1190 posts
Location
RHIT
Posted 08 April 2013 - 01:14 PM
He says he can replace turtle.forward() with turtle.turnLeft() and it works. So there must be.
Pfft, you never know :P/> Turtles have a mind of their own ^_^/>
Last time I checked mine all had a conspicuous lack of AI. So unless Dan/Cloudy have added that in
extremely recently then I doubt it :P/>
169 posts
Posted 08 April 2013 - 01:24 PM
He says he can replace turtle.forward() with turtle.turnLeft() and it works. So there must be.
Pfft, you never know :P/> Turtles have a mind of their own ^_^/>
Last time I checked mine all had a conspicuous lack of AI. So unless Dan/Cloudy have added that in
extremely recently then I doubt it :P/>
Cloudy would just make turtles print "No." repeatedly.
1190 posts
Location
RHIT
Posted 08 April 2013 - 01:28 PM
He says he can replace turtle.forward() with turtle.turnLeft() and it works. So there must be.
Pfft, you never know :P/> Turtles have a mind of their own ^_^/>
Last time I checked mine all had a conspicuous lack of AI. So unless Dan/Cloudy have added that in
extremely recently then I doubt it :P/>
Cloudy would just make turtles print "No." repeatedly.
> turtle.forward()
No
> turtle.turnRight() --Please?
No
> turtle.digDown() --Come on...
No
> turtle.implode() --
... No.
> print("No")
Certainly not.
24 posts
Posted 08 April 2013 - 02:42 PM
So I put some Coal in the first slot in its inventory, then did lua > turtle.forward() and it returned "false"
Then I put coal in every slot in its inventory, then did the same command and got "false"
1190 posts
Location
RHIT
Posted 08 April 2013 - 02:45 PM
So I put some Coal in the first slot in its inventory, then did lua > turtle.forward() and it returned "false"
Then I put coal in every slot in its inventory, then did the same command and got "false"
You need to actually make it refuel. Putting fuel into the inventory does nothing.
Add something like this to the top of the program.
turtle.select(2) --Or slot with fuel
turtle.refuel()
turtle.select(1) --Reset to the first slot
169 posts
Posted 08 April 2013 - 02:48 PM
Did you try fueling it, though? Putting coal in a turtle's inventory ~= fueling it. You have to call turtle.refuel().
EDIT: Bubba beat me to the punch, just ignore me.
1511 posts
Location
Pennsylvania
Posted 08 April 2013 - 02:49 PM
Or just enter into the command line interface:
refuel all
24 posts
Posted 08 April 2013 - 04:04 PM
Or just enter into the command line interface:
refuel all
UHG i feel dumb. Thank you! That was what I was missing. None of the Wiki posts really explained how Fueling worked so I never knew about that command.
1511 posts
Location
Pennsylvania
Posted 08 April 2013 - 04:37 PM
Or just enter into the command line interface:
refuel all
UHG i feel dumb. Thank you! That was what I was missing. None of the Wiki posts really explained how Fueling worked so I never knew about that command.
Ok, I am going to update the wiki right now. This has been discussed several times and I thought someone would have taken it upon themselves to do so.
*SuicidalSTDz furiously heads over to the wiki*