ComputerCraft

ComputerCraft

21M Downloads

Computer.turnOn() not working

PokemonInLua opened this issue · 4 comments

commented

I was using a simple script to turn on all of my computers, but the function

computer.turnOn()

did not work.

My code is at pastebin.com/rUpEhTyL, please tell me if i am doing something wrong, or if this is supposed to work.

Just to be clear, All that happens is it runs "time" in background, and when i uncomment the print() it will print false.

(And yes, I have tried without the if statements and no, the program does not crash)

commented

Just tried this: computer.turnOn() does work, it's just that computer.isOn() doesn't return true until the calling computer has at least yielded once. This makes sense, as the target computer needs to wait until the lua thread is free before it can boot in it. No bug.

commented

The problem is, the computers dont actually turn on.

commented

Then I can't replicate this problem. They do for me. Perhaps the startup
program on those computers has an error.

On 16 December 2015 at 15:09, PokemonInLua [email protected] wrote:

The problem is, the computers dont actually turn on.


Reply to this email directly or view it on GitHub
#63 (comment)
.

commented

This may be world related - people have been reporting "computers don't auto-start on chunk load" problems since at least CC 1.5, and "computer.turnOn() doesn't work either" has occasionally been mentioned alongside them.

http://www.computercraft.info/forums2/index.php?/topic/23393-173csp-creative-single-player-startup-quirks/

Catch is, none of the affected users (which don't include myself) have been able to figure out how others can reproduce either issue.