I made an API to make some things about programming turtles easier, but for some reason, the function that are supposed to make the turtle move don't make it move. I had them on an older program for mining before I made the API, and they worked fine then. I think the problem might have occurred due to how I combined automatically digging the block in front of it and waiting if it can't move forward because of an entity being in the way. I looked at it, but I still have no idea why it doesn't work.
API: http://pastebin.com/fpbEfZAF
Thanks in advance!
Movement Functions Not Working
Started by EnergyMatter, Aug 13 2013 05:22 PM
5 replies to this topic
#1
Posted 13 August 2013 - 05:22 PM
#2
Posted 13 August 2013 - 10:24 PM
You say you used it for an older program. Would this have been for the turtles were updated to require fuel? Turtles require fuel now to move. Other than that, I don't immediately see any problems with your API.
#3
Posted 13 August 2013 - 11:12 PM
Should line 25 be "math.random()" instead of "math.random"? This isn't really relevant to your problem though and I cannot see why your movement functions don't work.
#4
Posted 14 August 2013 - 10:55 AM
Yevano, on 13 August 2013 - 10:24 PM, said:
You say you used it for an older program. Would this have been for the turtles were updated to require fuel? Turtles require fuel now to move. Other than that, I don't immediately see any problems with your API.
#5
Posted 15 August 2013 - 07:31 AM
you always check if bedrock variable is false but you never set it to false it is set to nil initally.
if you change that part :
to this:
it should work
Greets
Loki
if you change that part :
local enter = nil local bedrockF = nil local bedrockU = nil local bedrockD = nil local bedrockL = nil local bedrockR = nil local bedrockB = nil local bedrock = nil
to this:
local enter = false local bedrockF = false local bedrockU = false local bedrockD = false local bedrockL = false local bedrockR = false local bedrockB = false local bedrock = false
it should work
Greets
Loki
#6
Posted 15 August 2013 - 08:32 AM
LordIkol, on 15 August 2013 - 07:31 AM, said:
you always check if bedrock variable is false but you never set it to false it is set to nil initally.
if you change that part :
to this:
it should work
Greets
Loki
if you change that part :
local enter = nil local bedrockF = nil local bedrockU = nil local bedrockD = nil local bedrockL = nil local bedrockR = nil local bedrockB = nil local bedrock = nil
to this:
local enter = false local bedrockF = false local bedrockU = false local bedrockD = false local bedrockL = false local bedrockR = false local bedrockB = false local bedrock = false
it should work
Greets
Loki
I'll try this now!
Thanks for helping me out!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











