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

Startup Script Freezes On Turtle.select()

Started by Cjreek, 12 September 2013 - 11:24 AM
Cjreek #1
Posted 12 September 2013 - 01:24 PM
Hi,

In my startup script for a turtle sometimes after loading the world (SP) the turtle freezes at a turtle.select() command.
I'm using Direwolf 20 1.5 v2 v1.1.3 FTB modpack (if this matters). it's quite annoying because I've to terminate and restart the program
manually sometimes which kinda destroys the advantage of startup scripts :-(

Edit: It's this script: http://pastebin.com/xch4dzMJ (line 34)

It also happens sometimes if I set a "turtle.select(1)" before the main while-true-do-loop
Lyqyd #2
Posted 12 September 2013 - 02:44 PM
Split into new topic.
immibis #3
Posted 12 September 2013 - 06:29 PM
Try calling sleep at the start. I've heard that some APIs have problems if you call them before pulling any other events (which sleep does internally)
Cjreek #4
Posted 13 September 2013 - 07:49 AM
Thanks Lua God,immibis I think this works :)/> (After restarting the world about 1246 times it never froze again so I think this fixed it)
MKlegoman357 #5
Posted 13 September 2013 - 03:21 PM
Thanks Lua God, I think this works :)/> (After restarting the world about 1246 times it never froze again so I think this fixed it)

A quick off-topic note:
The username of people is written on that blue line, above the reply. Lua God, Clueless are just "ranks", they depend on post count, they're not representing what a user is and are not usernames.
Cjreek #6
Posted 14 September 2013 - 08:30 AM
Oh thanks^^ I must have missed that :rolleyes:/>