local y = 0
local x = 0
term.clear()
term.setCursorPos(1,1)
print("Lumberjack has been enabled")
term.setCursorPos(3,1)
print("Loop:")
term.setCursorPos(3,6)
local times = tonumber(io.read())
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
bios:338: [string "Lumberjack"}:10: syntax errot
Started by gheotic, 31 December 2012 - 12:17 PMPosted 31 December 2012 - 01:17 PM
i keep getting this error i have no idea why it has worked in my other programs but not this anyone have an idea?
Posted 31 December 2012 - 01:23 PM
did you copy/paste this or retype it?
either way the uppercase P you have on Print("Lumberjack has been enabled") will cause an error, it should be lowercase
either way the uppercase P you have on Print("Lumberjack has been enabled") will cause an error, it should be lowercase
Posted 31 December 2012 - 01:30 PM
did you copy/paste this or retype it?
either way the uppercase P you have on Print("Lumberjack has been enabled") will cause an error, it should be lowercase
wops no i have tried that
i made a mistake writing this, but its not that
Posted 31 December 2012 - 01:39 PM
Theres nothing wrong with the code, are you using the right quotation marks?
Posted 31 December 2012 - 02:01 PM
Can you maybe post the full code?
tested what you posted, it works fine, doesn't do anything but no errors
tested what you posted, it works fine, doesn't do anything but no errors
Posted 31 December 2012 - 02:58 PM
Its for a turtle to chop down a 2x2 tree
then its just a menu at the start that dont work
then its just a menu at the start that dont work
local y = 0
local x = 0
term.clear()
term.setCursorPos(1,1)
print("Lumberjack has been enabled")
term.setCursorPos(3,1)
print("Loop:")
term.setCursorPos(3,6)
local times = tonumber(io.read())
print("Lumberjack has started")
print("Please put coal in slot 1")
while x < 1 do
turtle.refuel(4)
–turtle.select(16)
–turtle.suckUp(4)–turtle.getItemSpace())–get sapplings
turtle.forward()
turtle.up()
turtle.select(16)
turtle.forward()
turtle.placeDown()
turtle.forward()
turtle.placeDown()
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.turnRight()
turtle.forward()
turtle.placeDown()
turtle.turnLeft()
turtle.forward()
turtle.down()
turtle.turnRight()
turtle.turnRight()
turtle.select(15)
turtle.place()
turtle.place()
turtle.place()
–turtle.place()
turtle.turnRight()
turtle.turnRight()
turtle.forward()
turtle.forward()
turtle.turnRight()
turtle.turnRight()
turtle.select(1)
turtle.refuel(1)
turtle.forward()
turtle.dig()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.turnRight()
print("Tree is ready to get cutted")
print("loop has started")
while turtle.detectUp() do
if turtle.getFuelLevel() < 20 then
turtle.select(1)
turtle.refuel(1)
else
turtle.digUp()
turtle.forward()
turtle.digUp()
turtle.turnRight()
turtle.forward()
turtle.digUp()
turtle.turnRight()
turtle.forward()
turtle.digUp()
turtle.turnRight()
turtle.forward()
turtle.digUp()
turtle.turnRight()
turtle.up()
y = y + 1
end
end
turtle.refuel(3)
while not turtle.detectDown() do
turtle.down()
end
turtle.turnRight()
turtle.turnRight()
turtle.forward()
turtle.forward()
turtle.turnLeft()
turtle.select(2)
turtle.drop(64)
turtle.select(3)
turtle.drop(64)
turtle.select(4)
turtle.drop(64)
turtle.turnLeft()
turtle.select(1)
term.clear()
x = x + 1
end
term.setCursorPos(1, 1)
print("Turtle is done")
Posted 31 December 2012 - 11:24 PM
Use edit to find the exact line 10 that's throwing the error.
Posted 01 January 2013 - 04:22 AM
no syntax errors on or anywhere near line 10 .-.
that is not the full code
that is not the full code
Posted 01 January 2013 - 02:59 PM
This isn't revelent, but selecting "code" from the advanced BB code menu (third button on the top) and typing the code there works much better than quotes.