Posted 23 November 2012 - 02:41 AM
So, i am NOT an LUA user, i have no experience with it.
I was attempting to put in the 3x3 Mining program into one of my turtles.
HTTP access is not enabled on my server, so i could not download the program from pastebin, i had to type in the program manually.
After 30 minutes of copying code by hand, i finally finished.
I got bios:338 error, the first one, i figured out on my own, i had misspelled a word.
Now im getting another bios:338 error, and i checked the line that is erroring but i can't find anything incorrect. There must be something else in the code that i dont have knowledge about that is causing the error.
I tried googling around for the error, but i cannot find anything that resembles my exact problem.
The full error:
Bios:338: [string "Mine"]:75: '<name>' expected
The code:
I was attempting to put in the 3x3 Mining program into one of my turtles.
HTTP access is not enabled on my server, so i could not download the program from pastebin, i had to type in the program manually.
After 30 minutes of copying code by hand, i finally finished.
I got bios:338 error, the first one, i figured out on my own, i had misspelled a word.
Now im getting another bios:338 error, and i checked the line that is erroring but i can't find anything incorrect. There must be something else in the code that i dont have knowledge about that is causing the error.
I tried googling around for the error, but i cannot find anything that resembles my exact problem.
The full error:
Bios:338: [string "Mine"]:75: '<name>' expected
The code:
print("This program digs tunnel 3x3") --and even put every 5 blocks torch on wall
print("Important ! place torches in slot 1 and solid block to slot 2 !")
print("How long tunnel do you want ? ")
local x = read()
local times = 0
print("Digging "..x.." blocks long tunnel")
turtle.turnLeft()
while not turtle.forward() do
turtle.dig()
end
turtle.turnRight()
for i = 1, x do
while not turtle.forward() do
turtle.dig()
end
turtle.turnRight()
for j = 1, 2 do
for i = 1, 2 do
while not turtle.forward() do
turtle.dig()
end
end
turtle.turnLeft()
turtle.turnLeft()
while not turtle.up() do
turtle.digUp()
end
end
for k = 1, 2 do
while not turtle.forward() do
turtle.dig()
end
end
turtle.turnLeft()
turtle.turnLeft()
while not turtle.down() do
turtle.digDown()
end
if math.fmod(times,5) == 0 then
for u = 1, 2 do
while not turtle.forward() do
turtle.dig()
end
end
if not turtle.detect() then
turtle.select(2)
turtle.place()
end
turtle.select(1)
turtle.turnLeft()
turtle.turnLeft()
while not turtle.forward() do
turtle.dig()
end
turtle.turnLeft()
turtle.turnLeft()
turtle.place()
while not turtle.down() do
turtle.digDown()
end
while not turtle.forward() do
turtle.dig()
end
else
while not turtle.down() do
turtle.digDown()
end
for l = 1, 2 do
while not turtle.forward() do
turtle.dig()
end
end
end
turtle.turnRight()
times = times + 1
print("Fuel left: "..turtle.getFuelLevel())
--trash
local filled = 0
for q = 3, 16 do
if turtle.getItemCount(q) >= 1 then
filled = filled + 1
end
end
if filled > 8 then
turtle.turnRight()
while not turtle.forward() do
turtle.dig()
end
turtle.turnRight()
for z = 1, times do
while not turtle.forward() do
turtle.dig()
end
end
for t = 3, 16 do
turtle.select(t)
turtle.drop()
end
filled = 0
turtle.turnRight()
turtle.turnRight()
for w = 1, times do
while not turtle.forward() do
turtle.dig()
end
end
turtle.turnLeft()
while not turtle.forward() do
turtle.dig()
end
turtle.turnRight()
end
--trashend
end
turtle.turnRight()
while not turtle.forward() do
turtle.dig()
end
turtle.turnLeft()
print("And done")
local fuelstate = turtle.getFuelLevel()
print("I have "..fuelstate.." fuel")
if fuelstate < 1000 then
print("Please refuel me")
end