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

Turtle:18: Too Long Without Yielding error

Started by oldmanbill, 01 May 2013 - 08:20 PM
oldmanbill #1
Posted 01 May 2013 - 10:20 PM
Topic : Turtle:18: Too Long Without Yielding error . I am using s digging program I have used on other servers for my turtle, but when I use it on the server I am on now it only digs three blocks and then pauses until I get this error. line 18 is local run = 0.
Lyqyd #2
Posted 02 May 2013 - 12:48 PM
We will need the whole code.
Skillexs #3
Posted 15 May 2013 - 08:07 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
LBPHacker #4
Posted 15 May 2013 - 10:39 AM
In http://pastebin.com/yQSvCCQK:
senderID, message, distance = rednet
should be
senderID, message, distance = rednet.receive()

Explanation: The way you've coded it will set senderID to rednet (the rednet API, the table itself), and message and distance to nil.
Skillexs #5
Posted 15 May 2013 - 12:50 PM
now
avaitcommand:3: attemt to call nil
W00dyR #6
Posted 15 May 2013 - 01:09 PM
now
avaitcommand:3: attemt to call nil

On what script does it give you this error?
LBPHacker #7
Posted 15 May 2013 - 01:22 PM
He's talking about http://pastebin.com/yQSvCCQK, but the error he's mentioned would mean that rednet.receive is nil. And that's obviously not nil. Sorry Skillex, you definitely have a typo there.

OR you've overwritten the rednet API. Do you have "rednet = something" somewhere?
Skillexs #8
Posted 15 May 2013 - 02:16 PM
i use only these three codes together

no its like you told

senderID, message, distance = rednet.receive()
Arcusgaldan #9
Posted 25 June 2013 - 04:51 AM
event, senderID, message, distance = os.pullEvent("rednet_message").

The rednet.receive() doesn't give you the sent message, just does whatever you want WHEN a message is received. os.pullEvent("rednet_message") gives you the event, id, msg and distance. Replace this line with the rednet.receive() line, it should work.
theoriginalbit #10
Posted 25 June 2013 - 12:21 PM
The rednet.receive() doesn't give you the sent message, just does whatever you want WHEN a message is received. os.pullEvent("rednet_message") gives you the event, id, msg and distance. Replace this line with the rednet.receive() line, it should work.
Wrong… rednet.receive gives you the sender id, the message sent, and the distance that it was sent over! Please if you're going to try and help, make it accurate information.