Posted 07 August 2012 - 05:45 PM
                Hello,
I can just about to learn LUA scripting is good as me, I thought it hurt when I incht with LUA times move on. Since I Minecraft + ComputerCraft equaled right.
Now I've tried a tunnel program, but failing in the code.
Minecraft always brings:
"test:66: attempt to index ? (a nil value)"
Here is the code that I can say who is the mistake I think it's not easy.
The formatting is not perfect, but should not affect the function.
Thanks for the help.
Lindi
P.S: Sry for bad english. Translate by Google Translater Ger -> Eng.
                
            I can just about to learn LUA scripting is good as me, I thought it hurt when I incht with LUA times move on. Since I Minecraft + ComputerCraft equaled right.
Now I've tried a tunnel program, but failing in the code.
Minecraft always brings:
"test:66: attempt to index ? (a nil value)"
Here is the code that I can say who is the mistake I think it's not easy.
term.clear()
a = 3
b = 3
c = 3
x = a
x1 = 0
y1 = 0
z1 = 0
x2 = 0
y2 = 0
z2 = 0
if b>0
then
  y = b-1
else
  print ("y ist 0")
end
if c>0
then
  z = c-1
else
  print ("z ist 0")
end
print ("Y = " ..y)
print ("Z = " ..z)
print ("x1 = " ..x1)
print ("y1 = " ..y1)
print ("z1 = " ..z1)
print ("x2 = " ..x2)
print ("y2 = " ..y2)
print ("z2 = " ..z2)
while x1<x do			-- Schleife Turtle nach vorn abbauen
turtle.dig()
sleep(0.25)
turtle.forward()
print("vorwärts" ..x1)
while y1<y do			 -- Schleife Turtle nach rechts abbauen
  turtle.turnRight()
  turtle.dig()
  sleep(0.25)
  turtle.forward()
  print("rechts" ..y1)
  turtle.turnLeft()
  y1 = y1+1
end
y1 = 0
while z1<z do			-- Schleife Turtle nach oben abbauen
  turtle.digUp()
  sleep(0.25)
  turtle.up()
  z1 = z1+1
  print("hoch" ..z1)
  while y2<y do		  -- Schleife Turtle nach links abbauen
   turlte.turnLeft()
   turtle.dig()
   sleep(0.25)
   turlte.forward()
   print("links" ..y2)
   turlte.turnRight()
   y2 = y2+1
  end
  y2 = 0
end
z1 = 0
while z2<z do			-- Schleife Turtle nach unten zurück
  turtle.down()
  sleep(0.25)
  z2 =z2+1
  print("runter")
end
z2 = 0
x1 = x1+1
end			   -- ende Schleife Turtle nach vorn abbauen
while x2<x do			-- Schleife turtle zurück
turtle.back()
sleep(0.25)
x2 = x2+1
print("zurück")
end
The formatting is not perfect, but should not affect the function.
Thanks for the help.
Lindi
P.S: Sry for bad english. Translate by Google Translater Ger -> Eng.
 
         
                