Jump to content




Error when using turtle.getWorld()


  • You cannot reply to this topic
2 replies to this topic

#1 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

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.

#2 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 04 February 2013 - 12:06 PM

View PostBubba, on 04 February 2013 - 11:04 AM, said:

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.

#3 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 04 February 2013 - 12:29 PM

View Postimmibis, on 04 February 2013 - 12:06 PM, said:

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 :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users