can u guys find any mistakes? Pls reply!
When i run the program "Wood.txt" this show up:
bios:338: [string "wood.txt"]:39: 'end' expected (to close 'function' at line 7)
Here the code:
function fixaFuel()
if turtle.getFuelLevel < 100 then
turtle.select(16)
turtle.refuel(1)
end
function fixaBoneMeal()
if turtle.getItemCount(2) == 0 then
print "Fixa mer BoneMeal!"
end
function plantera()
turtle.forward()
turtle.forward()
turtle.select(1)
turtle.place()
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
turtle.place()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
turtle.turnRight()
turtle.place()
turtle.turnRight()
turtle.forward()
for slot=3,10 do
turtle.select(slot)
turtle.drop()
end
turtle.turnLeft()
turtle.turnLeft()
turtle.select(1)
turtle.place()
turtle.select(2)
turtle.place()
end
0
bios:338: [string "wood.txt"]:39: 'end' expected
Started by unzzenedy, May 17 2013 02:40 AM
2 replies to this topic
#1
Posted 17 May 2013 - 02:40 AM
#2
Posted 17 May 2013 - 09:49 AM
function func(param) while true do if not true then -- Comment elseif blue then -- New Comment else -- Last Comment end end end
Make sure you have enough ends for the function, loop and if blocks you open. Presently you have just nested all of the following functions into fixaFuel.
#3
Posted 17 May 2013 - 12:30 PM
The end at the veeeerry bottom is not needed.
Hope I helped! ~CtrlAltElite
turtle.turnLeft() turtle.turnLeft() turtle.select(1) turtle.place() turtle.select(2) turtle.place() -- Not needed! end
Hope I helped! ~CtrlAltElite
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users