saving function
Displaying 1-4 of 4 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Psalt

Hrm.. Working on a save function using readvars and writevars... but I got this error:

vc_ReadVars: memory exhausted on 2242668800 bytes.

why in the world would VERGE even use that much memory?? I remember hearing that the functions did not work correctly all the time but i thought that would have been fixed by VERGE2k+j (the version i am using)

here is the relivant code:

void Save()
{
int file;
file=fwopen("card.sav");
WriteVars(file);
fwclose(file);
}

void LoadGame()
{
int file;
file=fopen("card.sav");
ReadVars(file);
fclose(file);
map(current_map); //curent_map is a global var
}



"Without pain one may not create beauty"

Posted on 2001-07-28 00:26:54

Roto

Then again, knowing how people never record these things in utterly complete and understandable detail, I could be wrong.

Normally I would suggest whoever broke it, fix it, but when it comes to Verge and its developers'...you can only feh and work around it.

Read and WriteVars() do not work in Verge2k+j according to the admittal of others, to read and save variables, you'll simply need to learn how to use file input and output functions. They're incredibly easy to use. Once you get the hang of it, you'll be writing up save and load functions in no time. On top of that, the knowledge learned can be applied to other things.

If you want a lil' more assistance other than ranting advice, I'll be glad to give it.



Posted on 2001-07-28 05:22:14

rpgking

It was only fixed(or so tsB says) in v2.6. But I don't even recommend using Read/WriteVars at all. It's better to just write your own savefile system, because then you won't write a bunch of unnecessary global variables to a savefile.

-rpgking



Out of clutter, find simplicity. -Einstein

Posted on 2001-07-28 23:28:14

Hatchet

you won't invalidate your image/sound/other pointers, which was always a problem with readvars().



-Hatchet

Posted on 2001-07-29 22:47:06


Displaying 1-4 of 4 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.