Posted 07 July 2013 - 06:23 PM
error
minecraft 152 mod pack : ftb 152ngt modified computer craft :1.5.3
error : bios : 100 : vm error : java.lang.ArrayIndexOutOfBoundsException: -3
press any key to continue
code of the turtle in question :
im wondering if the error is my code or a computer craft bug
and the server console has this error whenever I place down the turtles:
2013-07-07 17:28:22 [INFO] [STDOUT] ComputerCraft: Error running task.
2013-07-07 17:28:22 [INFO] [STDERR] java.lang.ThreadDeath
2013-07-07 17:28:22 [INFO] [STDERR] at java.lang.Thread.stop(Unknown Source)
2013-07-07 17:28:22 [INFO] [STDERR] at dan200.computer.core.ComputerThread$1
.run(ComputerThread.java:153)
2013-07-07 17:28:22 [INFO] [STDERR] at java.lang.Thread.run(Unknown Source)
minecraft 152 mod pack : ftb 152ngt modified computer craft :1.5.3
error : bios : 100 : vm error : java.lang.ArrayIndexOutOfBoundsException: -3
press any key to continue
code of the turtle in question :
rednet.open("right")
while true do
local id, string ,distance = rednet_message
if string == "harvest" then
shell.run("harvest")
else
end
end
as the start up and this is the main sugar cane harvesting program :
local function harvest()
for i = 1,64 do
turtle.dig()
turtle.forward()
turtle.digDown()
end
turtle.forward()
if turtle.getFuelLevel() <= 5000 then
turtle.select(1)
turtle.refuel(64)
turtle.select(1)
end
end
local function rowswitchRight()
turtle.turnRight()
turtle.forward()
turtle.forward()
turtle.turnRight()
end
local function rowswitchLeft()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.turnLeft()
end
local function switchlaneRight()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
end
local function switchlaneLeft()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
end
local function dropoff()
turtle.select(16)
turtle.placeDown()
for i = 1,15 do
turtle.select(i)
turtle.dropDown()
end
turtle.select(16)
turtle.digDown()
turtle.select(1)
end
--first row
harvest()
rowswitchRight()
--bulk harvest
for i = 1,6 do
harvest()
switchlaneLeft()
harvest()
rowswitchRight()
dropoff()
end
--last row
harvest()
--return to start
turtle.turnRight()
for i = 1,20 do
turtle.forward()
end
turtle.turnRight()
dropoff()
there is a turtle at the other end with a simple shell.run() and this code :
rednet.open("right")
while true do
if turtle.suckDown then
print("no more sugar cane")
rednet.broadcast("harvest")
print("sent message to sugar farmer")
end
sleep(60)
end
im wondering if the error is my code or a computer craft bug
and the server console has this error whenever I place down the turtles:
2013-07-07 17:28:22 [INFO] [STDOUT] ComputerCraft: Error running task.
2013-07-07 17:28:22 [INFO] [STDERR] java.lang.ThreadDeath
2013-07-07 17:28:22 [INFO] [STDERR] at java.lang.Thread.stop(Unknown Source)
2013-07-07 17:28:22 [INFO] [STDERR] at dan200.computer.core.ComputerThread$1
.run(ComputerThread.java:153)
2013-07-07 17:28:22 [INFO] [STDERR] at java.lang.Thread.run(Unknown Source)
Edited by