Jump to content




Why don't my turtles resume when reloaded?


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

#1 Truitedu18

  • Members
  • 5 posts

Posted 20 March 2013 - 01:20 PM

I play at Feed The Beast Ultimate and I decide to use the turtles to mine and to do lot of things.
But I have a very big bug : every time I reload my World or the chunk where my turtle is unload, the turtle is entirely reset.
It's very problematic when I use a turtle to excavate and when I have to replace it every time.
However, this mod is very very good, I love it !

Thanks

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 21 March 2013 - 06:28 AM

Split into new topic.

All computers which were on when the chunk was unloaded are rebooted when it reloads.

#3 Truitedu18

  • Members
  • 5 posts

Posted 21 March 2013 - 07:49 AM

Ah, so.

Are you a solution to use a turtle like an Quarry without restart it all the time ?
I thought to create a file in the turtle with this coordinates to be able to continue the excavation, it's possible ?

Thanks

#4 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 21 March 2013 - 07:53 AM

Yes, it's possible to write a script which can keep track of what it's doing and where it's at and resume after a reboot. It may be best to use GPS to determine the position and heading when the turtle starts up, since accurately tracking turtle location across reboots is somewhat tricky.

#5 Truitedu18

  • Members
  • 5 posts

Posted 21 March 2013 - 08:49 AM

Okay, thank you, I will search more information on GPS to do better programs :)

#6 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 21 March 2013 - 12:30 PM

For the writing to files you should do something like this:

write coords:
local tCoords = {}
tCoords.x = yourX
tCoords.y = yourY
tCoords.z = yourZ
local fileName = "myfile"
local file = fs.open = ( fileName, "w" )
fs.write( textutils.serialize( tCoords ) )
file.close()

To read files:
local fileName = "myfile"
local file = fs.open( fileName, "r" )
local reader = file.readAll()
file.close()

local coords = textutils.unserialize( reader )
print( coords.x )
print( coords.y )
print( coords.z )

That should help you quite a lot if you have found some GPS stuff :)
All credits go to LBPHacker's tutorial: http://www.computerc...bles-in-a-file/





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users