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

Error when using turtle.getWorld()

Started by Bubba, 04 February 2013 - 10:04 AM
Bubba #1
Posted 04 February 2013 - 11:04 AM
I've been struggling with this one all afternoon, but I can't seem to find any solution to it. The error log is here (real issue starts at line 30), and the file which I believe is causing the problems is here.

The problem occurs upon placing the turtle with the peripheral attached to it in the world and then exiting/reloading the world. The turtle will lose all data/id/peripheral and revert to the default orientation.

Just as a note, I am using a deobfuscated version of ComputerCraft inside of eclipse to ease the debugging process.

Any help would be greatly appreciated.
immibis #2
Posted 04 February 2013 - 12:06 PM
I've been struggling with this one all afternoon, but I can't seem to find any solution to it. The error log is here (real issue starts at line 30), and the file which I believe is causing the problems is here.

The problem occurs upon placing the turtle with the peripheral attached to it in the world and then exiting/reloading the world. The turtle will lose all data/id/peripheral and revert to the default orientation.

Just as a note, I am using a deobfuscated version of ComputerCraft inside of eclipse to ease the debugging process.

Any help would be greatly appreciated.

Try getting the world when you need it, instead of when the peripheral is created.
Also, world should not be static. Static means that all AdvUpgradeMethods share the same world, which isn't what you want.
Bubba #3
Posted 04 February 2013 - 12:29 PM
Try getting the world when you need it, instead of when the peripheral is created.
Also, world should not be static. Static means that all AdvUpgradeMethods share the same world, which isn't what you want.

That worked perfectly! Thanks a ton :)/>