Blockland Forums > Modification Help

FileObjects - Saving and Loading Data

Pages: << < (2/4) > >>

Nexus:

I want the data to still be available after the server has closed.  If I do use a script object, I will have to come back to this anyway.

I am trying to understand Iban's cityRPG saving system, but it is one of the most complicated pieces of code I have ever tried to make sense of.

Iban:

I did not write Sassy.

lilboarder32:


--- Quote from: Nexus on April 11, 2011, 12:42:34 AM ---I want the data to still be available after the server has closed.  If I do use a script object, I will have to come back to this anyway.

I am trying to understand Iban's cityRPG saving system, but it is one of the most complicated pieces of code I have ever tried to make sense of.

--- End quote ---
If you use that list above you easily use script objects for this.
Set the values like SO.value[4109] = "taco bell mascot";
Then to save it just call SO.save(filePath);
And then execute saved file.

Nexus:


--- Quote from: lilboarder32 on April 11, 2011, 01:05:06 AM ---If you use that list above you easily use script objects for this.
Set the values like SO.value[4109] = "taco bell mascot";
Then to save it just call SO.save(filePath);
And then execute saved file.

--- End quote ---

I think this would work better with arrays and exporting, or am I misunderstanding what you are suggesting?

is ::save(%filepath) a default function or something I need to write, because that is pretty much what I have been trying to do, but not succeeding.

Iban:

::save is a default function for all object types.

ConsoleObject.save("config/test.txt");

Pages: << < (2/4) > >>

Go to full version