Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Save Array???

Author
Message
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 14th Dec 2012 20:24
Hi guys!

What is the command for saving a array (in a file)? I don't find anything about this.

Thanks
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 14th Dec 2012 20:30
There is no such command. Sorry.

If you are working in Tier 2, you could do something with agk::WriteByte command, using a char* pointer to the start of your array and writing each byte until you hit the end of your array size. You would want to store the array dimension(s) first so that you could use them to recreate the array from the file.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 14th Dec 2012 21:17
Yes, no save array command like in DB Pro unfortunately (I used it all the time). You will have to use the file commands instead. Something like this works.


Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 14th Dec 2012 21:30
Ancient Lady, i use Tier 1.

DVader, I also use DB pro (for this reason, my question).

It's a pity that the command isn't in AGK. I will have to save the array with that method.

Thanks!
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 14th Dec 2012 22:23
I'm pretty sure the save array will be doing something similar in the background, this is just having to go one step more really. All good coding practise! The load array command just looks a little neater to read through is all

Login to post a reply

Server time is: 2024-04-28 19:49:48
Your offset time is: 2024-04-28 19:49:48