51 posts
Posted 10 December 2013 - 06:07 PM
error is on line 43
while true do
turtle.getFuelLevel(l)
if ..l >=200 then
refuel()
rednet.send(1, "Refuelling... ")
else
rednet.send(1, "mining... ")
mine()
Empty()
end
end
line 43
if ..l >=200 then
iv tried everything i can think of and google drew a blank
110 posts
Posted 10 December 2013 - 06:21 PM
I've never seen that syntax before. (I'm not a Lua expert, though.) Try this instead:
if turtle.getFuelLevel() >= 200 then
getFuelLevel() takes no parameters.
1140 posts
Location
Kaunas, Lithuania
Posted 11 December 2013 - 01:19 AM
Next time post what error you get and give us your full code. It is easier to help when we have the code.
2151 posts
Location
Auckland, New Zealand
Posted 11 December 2013 - 03:14 AM
error is on line 43
while true do
turtle.getFuelLevel(l)
if ..l >=200 then
refuel()
rednet.send(1, "Refuelling... ")
else
rednet.send(1, "mining... ")
mine()
Empty()
end
end
line 43
if ..l >=200 then
iv tried everything i can think of and google drew a blank
Are you trying to refuel it if the fuel level is below 200?
If so, try this:
while true do
local fuelLevel = turtle.getFuelLevel()
if fuelLevel <= 200 then
refuel()
rednet.send(1, "Refuelling... ")
else
rednet.send(1, "mining... ")
mine()
Empty()
end
end
Edited on 11 December 2013 - 02:15 AM