Smaug Area Save Problem

Posted by Kraevin on Tue 28 Jun 2005 09:41 PM — 4 posts, 14,683 views.

USA #0
I added a new variable to my mobs called treasure_type. It is a short int variable. I Can mset it and see it in mstat but when i savearea for proto areas or foldareas for installed area that value does not save. I have been beating my head on the wall over this for a while now and hoping someone can tell me what i screwed up or point me at some file loc where the save and load variables are defined that i missed.
USA #1
Have you added the load/save code to build.c (saving the area) and db.c (loading the area)?
USA #2
Yes i added them I actually got in and look and it is saving it to the area file just not loading it for some reason

here is code i added to loadarea:

letter = fread_letter( fp );
if (letter == '>' || letter == '#')
ungetc(letter,fp);
else
{
ungetc(letter,fp);
pMobIndex->treasure_type = fread_number( fp );
}

The variable is right before mobprogs or next mob.

I had it on the same line as the defenses but that didnt save for somereason.

Actually as i look at it reads to pMobIndex but it is set and saved from Char_data is there somewhere that the mobindex data is transfered to char data?
Amended on Tue 28 Jun 2005 11:11 PM by Kraevin
USA #3
After i posted I kept looking and found where its set at :) working now :)