Adding new object data corrupting area files.

Posted by Valna on Sun 11 Apr 2004 02:26 AM — 2 posts, 10,763 views.

#0
I had expected this to happen when i began to start adding
pObjIndex data, but i thought i had covered all the bases.
I was simply trying to add a new array. Value2[6]. Following
basically the same format as the value array already in place.
placing code in the same places in save.c such as fwrite_obj and load_obj.
Now i knew going in this was going to change the area version
and the like, but i'm having trouble getting value2 index values
to save to the .are files. I editted db.c to write value2
to the area files as well. but as far as i can tell it still
does not write them when the area file is created...

Here is an example of objects written under the different
code:
#OBJECTS
#200
anchor object~
an anchor object~
An anchor object is lying on the ground~
~
13 1073741824 0
0 0 0 0 value
1 0 0


#OBJECTS
#700
dagger~
a dagger~
A dagger is here.~
~
5 1073741824 32769
12 10 3 2 value
0 10 0 0 value2
1 0 0


everything appears correct to me. it writes the field in
the .are files as i anticipated. However when i attempt to load it
crashes.. any thoughts?

#1
nevermind, i just needed to add that set of values to all existing objects in the area.lst and remove a conditional statement from the load_objects function. sorry for the
wasted subject.