This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Illwind's profile picture

while Excavating too long without yielding error

Started by Illwind, 15 April 2013 - 03:34 AM
Illwind #1
Posted 15 April 2013 - 05:34 AM
Hello,

I have a mining turtle running on my server that I gave the "excavate 100" command and when I went to check on it. The excavate program crashed and returned :
excavate:92: Too long without yielding
I broke the turtle and replaced it again but now with "excavate 90" command. And again it crashed and returned a "Too long without yielding" error.

If someone knows what i have too do to fix it. I would appreciate that.

-Illwind


P.S sorry for any grammer or spelling mistakes. English isn't my first language. :)/>
SuicidalSTDz #2
Posted 15 April 2013 - 05:56 AM
when I went to check on it
That's the problem, you left the chunk. The turtle unloaded and returned an error, well, that is what i'm guessing. Make sure to keep the chunk the turtle is in loaded.
Illwind #3
Posted 15 April 2013 - 06:09 AM
when I went to check on it
That's the problem, you left the chunk. The turtle unloaded and returned an error, well, that is what i'm guessing. Make sure to keep the chunk the turtle is in loaded.

No thats not the issue. i placed a chuckloader and the turtle was in its radius.
SuicidalSTDz #4
Posted 15 April 2013 - 06:21 AM
Does your server lag at all? If it does, the turtle being halted in it's current function could throw an error (I think)
Deadly0Night #5
Posted 15 April 2013 - 06:28 AM
It could be too big, if you have a loop that doesn't break in a certin time doesn't is have that exact error. try something small 60 or 30 or even just 10. hope I help in some way.
H4X0RZ #6
Posted 15 April 2013 - 12:07 PM
You can make a code like this

local tArgs = {...}
local arg1 = tonumber(tArgs[1])
If arg1 == nil then
print("You can't mine nothing")
elseif arg1 <= 10 then
for i = 1, arg1, 1 do
turtle.digDown()
turtle.down()
end --It creates an rabbit hole
elseif arg1 > 10 then
function mining() --[[ you need this funktion for mining when arg1 is over 10 ]]
for i = 1, 10, 1 do
turtle.digDown()
turtle.down()
end
for i = 1, arg1/10, 1 do
mining()
end
End
-- It only works with numbers like 10,20,30,40 etc.
-- And it works with 1,2,3,4,5,6,7,8,9 ^^

Description:
It's very simple, fron 1 to 9 the code only builds a rabbit hole.
If it's over 9 it will run a function (to explanation: 20) 2 times(the mining function )

Please correct my code if anything is wrong
Skillexs #7
Posted 15 May 2013 - 08:09 AM
I have the problem withe 3 codes working together
http://pastebin.com/B4ZpxpmV
http://pastebin.com/yQSvCCQK
http://pastebin.com/jypAecUh
and on the turtle it says
Too long without yielding
but on computer nothing