Blockland Forums > Modification Help
Saving And Loading Vars
jes00:
How would I go about saving and loading a player's vars(Example: %client.Gold)?
Truce:
I haven't worked with it myself yet, but I believe the thing Badspot put in recently would be appropriate here.
http://forum.blockland.us/index.php?topic=174411.msg4480468#msg4480468
MegaScientifical:
$jes::player[%client.bl_id]::gold = %client.Gold;
export("$jes::*", "config/server/jesPrefs.cs", False);
Do not try to export into a .zip file. I accidentally did that once (./ in the command) and it created ghost data that broke the game. Basically, the computer shows no file in the zip or outside of it, but the game says the data is partially there and broken, so it doesn't execute the add-on. Remaking the zip would not delete the ghost data, it was unattached and the only program that could see it was Blockland. My only solution was putting a blank version of the file in my .zip. This happened on Windows XP, not sure it could still happen.
Dang it, Truce... Forgot about that.
jes00:
--- Quote from: Truce on December 07, 2011, 12:08:31 PM ---I haven't worked with it myself yet, but I believe the thing Badspot put in recently would be appropriate here.
http://forum.blockland.us/index.php?topic=174411.msg4480468#msg4480468
--- End quote ---
I don't understand that completely.
--- Quote from: MegaScientifical on December 07, 2011, 12:11:08 PM ---$jes::player[%client.bl_id]::gold = %client.Gold;
export("$jes::*", "config/server/jesPrefs.cs", False);
Do not try to export into a .zip file. I accidentally did that once (./ in the command) and it created ghost data that broke the game. Basically, the computer shows no file in the zip or outside of it, but the game says the data is partially there and broken, so it doesn't execute the add-on. Remaking the zip would not delete the ghost data, it was unattached and the only program that could see it was Blockland. My only solution was putting a blank version of the file in my .zip. This happened on Windows XP, not sure it could still happen.
--- End quote ---
But how would I load it? It says the red is a syntax error:
$Skill::Client[%client.bl_id]::Gold = %client.Gold;
-Jetz-:
--- Quote from: MegaScientifical on December 07, 2011, 12:11:08 PM ---Do not try to export into a .zip file. I accidentally did that once (./ in the command) and it created ghost data that broke the game. Basically, the computer shows no file in the zip or outside of it, but the game says the data is partially there and broken, so it doesn't execute the add-on. Remaking the zip would not delete the ghost data, it was unattached and the only program that could see it was Blockland. My only solution was putting a blank version of the file in my .zip. This happened on Windows XP, not sure it could still happen.
--- End quote ---
You sure it didn't just go into a folder of the same name, in the same directory as the zip?