Save strings

R

Rieudo

I would like to able to save units and if possible items etc. and iv heard i need a save string to able to save in a game and close out of it and start a new game later and be able to load it. So if some one could plz tell me how to do the string or atleast how to do strings in general that would be great. Thx
 

Stardragon

Member!
Joined
Nov 9, 2003
Messages
106
Reaction score
0
Location
Sweden
Website
www.beelzebub.se
This is highly advanced crap, the last time I checked the code for this kind of thing is +10 A4 pages long..

You need to know what you are doing too, setting items and so on in the code etc etc.
 
R

Rieudo

lol well crap....that does sound complicated but if some one could tell me a tutorial or something on how to learn that i would like to see, it its prob the next step for me any ways.
 

Darimus

BattleForums Addict
Joined
Oct 2, 2003
Messages
681
Reaction score
0
Website
www.spaceman.vze.com
I made my own... heres some advice...

If you use a system of 62 characters (0-9, a-z, A-Z) you can fit any number up to 61 in one spot of the code (1 character). If the max level is 20 or 50 you could use this method. If you need to store more, You can use a 2-digit system as I did, where you can store up to about 2500 (despite the fact that it should be 3721 mathematically, war3 doesn't want to let me loop 3,721 times... only 2500). and for storing gold which was supposed to be a number up to 1 million (max gold) i wanted to make a 3-digit system but I ran into the problem of only being able to loop around 2500 times... so I stored by using 2 2-digit parts (4 characters in the code) and it stored by splitting the gold amount into 2 parts. (not dividing the gold amount by 2 but the length of the gold string) so if you had 999,999 gold, it stores 999 in the first 2-digit and 999 in the second 2-digit and the loading code restores it like that

but theres many ways to do it... you could do it w/o any looping if you wanted I guess
 

New threads

Top