de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Saving and loading an array?
PostPosted: Fri Sep 11, 2015 11:48 am 
Offline
Veteran
User avatar
loadArray doesn't exist, right?

So, how to I save an array to data.properties and then load it again?

Code:
def testArray = ["Black","White","Red"]

...

save("testscript.testArray",testArray)

...

testArray = loadArray("testscript.testArray")

???

I know loadArray (above) doesn't work; I'm just trying to illustrate what I want to do here.

When I used loadString, it did exactly as expected: made testArray = "["Black","White","Red"]"; a text string, not an actual array.

What do I use to do this?

If it can't be done, I do have a workaround in mind, but I'm curious if/how to do this anyway for future use.


Top
 Profile Send private message 
 
 Re: Saving and loading an array?
PostPosted: Fri Sep 11, 2015 12:06 pm 
Offline
Veteran
User avatar
you can do it with eval, will just not work on android...

e.g.
Code:
testArray = Eval.me(loadString("testscript.testArray"))

_________________
Liz

You can't take something off the Internet - it's like taking pee out of a pool.
https://play-clan.site profile: Liz


Top
 Profile Send private message 
 
 Re: Saving and loading an array?
PostPosted: Fri Sep 11, 2015 12:09 pm 
Offline
Site Admin
User avatar
see here


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 111 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.