playMaker

Author Topic: Eeasy Save 2 - saving multiple arrays problem  (Read 2362 times)

friendlydog

  • Junior Playmaker
  • **
  • Posts: 65
Eeasy Save 2 - saving multiple arrays problem
« on: September 26, 2014, 09:17:56 AM »
Hi,

I have 2 arrays (components) attached to a game object. I can read and write data into and from these arrays just fine. (I have the newest playmaker, easy save, arraymaker and datamaker plugins).

When I use the "Array List Easy Save" action and setup the action with the array reference and a unique tag it saves fine to the easy save text file.

But when I try to save a second array in the same state (with its own "unique tag" and reference string), all data in the easy save text file just gets completely overwritten.
so basically, I can only save 1 array to the easy save text file.

This can't be right, no?
How can I save several arrays in the same easy save text file??

thanks in advance (been ripping my hair out over this for days now)

friendlydog

  • Junior Playmaker
  • **
  • Posts: 65
Re: Easy Save 2 - saving multiple arrays problem
« Reply #1 on: September 26, 2014, 11:17:29 AM »
nevermind - solved it.
apparently playmaker executes actions faster than easy save writes to file - thus canceling out previous save actions in the same state.

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: Eeasy Save 2 - saving multiple arrays problem
« Reply #2 on: September 26, 2014, 12:13:14 PM »
So how did you solve it? To overcome that issue I ended up splitting out my arrays into their own files. Just wondering if there was a better way.

friendlydog

  • Junior Playmaker
  • **
  • Posts: 65
Re: Eeasy Save 2 - saving multiple arrays problem
« Reply #3 on: September 26, 2014, 01:05:49 PM »
I found out first by putting the "Array List Easy Save" action for each array in a separate state, while still having them write to the same file - which miraculously worked.

Then I set up a 2 state loop that iterates through my 25 arrays by building the reference string from the iterator int in one state, and the "Array List Easy Save" action in the other state - writing to the same text file in a loop.

read it out again afterwards without any errors - seems to work so far.