dataobj.dll v1.0
Copyright 2002 Cristobal Tapia (aka Abstracto)

This DLL stores named strings on fake object structures.
It can be useful for RPG games, or any game with lots of data pieces.

The DLL has only 2 functions. You can use this WDL code to use it:

//----------------------------------------------------------------
// declare DLL functions at start up

var dataobj_dll;
dllfunction SetObjectData(obj, attr, value );
dllfunction GetObjectData(obj, attr, str_val );

//you need to open the DLL before calling the functions
dataobj_dll=dll_open("dataobj.dll");

//and remember to close it at shut down
dll_close(dataobj_dll);

//using the functions 
SetObjectData("object1","attrib1","value 1");
GetObjectData("object1","attrib1",s);

//-----------------------------------------------------------------

On this code, "object1" is the name of an object. 
"attrib1" is the name of an attribute. 
You can create as many object as you want. 
Each object can have as many attributes as you want.
With SetObjectData, you stores a string on the an attribute of an object.
If doesn't exist an object with this name, a new one is created.
If doesn't exist an atribute on this object with this name, the attribute is created.
To delete an attribute, just assing it a value of "" (empty string).

GetObjectData retrieves a string value from an attribute of an object.
If this object or attribute doesn't exist, the string will be "".
Due to the fact im still experimenting with 3DGameStudio SDK, the string is returned
by copying it to an existent WDL string (s on the example). 
The WDL string must have enought space to store the value string. 
If not, the returned string can be truncated to prevent engine crashes.

Please, sent your comments, ideas, bugs to Abstracto at the conitec forum.




