Posted 06 February 2013 - 12:39 PM
Hi,
my english isn't so good. My german is much better ^^
ehm..
have the same problem.
my turtle tells me: bios:338: [string "haus"]:59: '=' expected
Follow programm build a house. Isn't finish. I would test is, but is this error. Line 59 is
hoch = hoch + 1
Whats wrong in this line?
it's my first lua programm ^^
and sorry for my bad english ^^
my english isn't so good. My german is much better ^^
ehm..
have the same problem.
my turtle tells me: bios:338: [string "haus"]:59: '=' expected
Follow programm build a house. Isn't finish. I would test is, but is this error. Line 59 is
hoch = hoch + 1
Whats wrong in this line?
it's my first lua programm ^^
and sorry for my bad english ^^
local hoch = 0
local reihen = 0
local laenge = 12
local treppenslot = 11
local materialslot = 2
function baumstamm()
turtle.select(1)
turtle.placeDown()
turtle.turnLeft()
turtle.forward()
turtle.select(materialslot)
end
function pruefen()
if turtle.getItemCount(materialslot) < 1 then
materialslot = materialslot + 1
turtle.select(materialslot)
turtle.placeDown()
turtle.forward()
else
turtle.placeDown()
turtle.forward()
end
end
function treppe()
turtle.select(treppenslot)
if turtle.getItemCount(treppenslot) < 1 then
treppenslot = treppenslot + 1
turtle.select(treppenslot)
turtle.placeDown()
turtle.forward()
else
turtle.placeDown()
turtle.forward()
end
end
--Wände hochziehen******************
while hoch < 5 do
baumstamm()
--lange Hausseite
for i = 1,18 do
pruefen()
end
baumstamm()
--kurze Hausseite
for i = 1,10 do
pruefen()
end
baumstamm()
--lange Hausseite
for i = 1,18 do
pruefen()
end
baumstamm()
--kurze Hausseite
for i = 1,10 do
pruefen()
end
turtle.up
hoch = hoch + 1
if hoch == 1 then
materialslot = 3
end
end
--************************************
-- Dach*******************************
-- Erste Reihe mit Wand
turtle.turnLeft()
turtle.turnLeft()
while laenge > 0 do
treppe()
if laenge > 2 then
turtle.select(materialslot)
for i = 1,laenge do
prüfen()
end
turtle.turnLeft()
turtle.turnLeft()
treppe()
turtle.up()
laenge = laenge - 2
end
--********
--zum Start
turtle.turnLeft()
turtle.forward()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.down()
turtle.turnRight()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.turnRight()
turtle.forward()
turtle.forward()
turtle.turnRight()
--*****
--Dachsims
for i = 1,5 do
treppe()
turtle.up()
end
treppe()
for i = 1,5 do
turtle.down()
turtle.forward()
end
turtle.turnLeft()
turtle.turnLeft()
for i = 1,5 do
treppe()
turtle.up()
end
treppe()
--*****
--zum Start
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnLeft()
for i = 1,5 do
turtle.down()
turtle.forward()
end
turtle.turnLeft()
turtle.turnLeft()
--Dachboden
turtle.select(materialslot)
turtle.down()
turtle.forward()
while reihen < 18 do
for i = 1,10 do
pruefen()
end
reihen = reihen + 1
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
turtle.forward()
for i = 1,10 do
pruefen()
end
reihen = reihen + 1
turtle.turnRight()
turtle.forward()
turtle.turnRight()
turtle.forward()
end