1. b. add "local" at the start "local function fuel()"
c. Naming convention in Lua make names start without a cap for the first word.
3. I am pretty sure that the correct syntax is "label set [name]", at least I use that one all the time.
4. at the end, it should be turtle.getFuelLevel()
Oh well, srew it:
Code:
local function fuel()
if (turtle.getFuelLevel() < 200) then
turtle.refuel(1)
--Will only take 1 item from the currently selected slot, might not be what is wanted here.
end
end
fuel()
print turtle.getFuelLevel()