Blockland Forums > Modification Help
Saving And Loading Vars
MegaScientifical:
--- Quote from: jes00 on December 08, 2011, 05:16:42 PM ---Ok, lets say there is a little noob named Bob who joins the server and gets ten gold, Bob now leaves the server and comes back, now the server needs to execute the file holder everyone's vars or Bob will have no gold and he will say "What?!?! what is my gold?". The End.
--- End quote ---
You're still assuming that suddenly the variable no longer exists because he left. If you're saving them as $ variables in the first place, it's still there.
Realizing you want to use the %client.gold, you can still just have it do %client.gold = $jes::blid[%client.bl_id]::gold; or something. Otherwise, it would be simple to just keep it applied to a variable... Meh. I don't think I'll try here anymore, I'm not helping.
Destiny/Zack0Wack0:
--- Quote from: jes00 on December 08, 2011, 05:44:35 PM ---I know nothing about file objects so what does this do exactly?
--- End quote ---
replace filepath with "config/mydata/"
jes00:
--- Quote from: MegaScientifical on December 08, 2011, 11:35:12 PM ---You're still assuming that suddenly the variable no longer exists because he left. If you're saving them as $ variables in the first place, it's still there.
Realizing you want to use the %client.gold, you can still just have it do %client.gold = $jes::blid[%client.bl_id]::gold; or something. Otherwise, it would be simple to just keep it applied to a variable...
--- End quote ---
So the variable is not deleted when they leave?
--- Quote from: MegaScientifical on December 08, 2011, 11:35:12 PM ---Meh. I don't think I'll try here anymore, I'm not helping.
--- End quote ---
You've helped the most D:
--- Quote from: Destiny/Zack0Wack0 on December 09, 2011, 01:09:04 AM ---replace filepath with "config/mydata/"
--- End quote ---
Result: nothing.
Superb:
--- Quote from: jes00 on December 09, 2011, 07:24:28 AM ---So the variable is not deleted when they leave?You've helped the most D:Result: nothing.
--- End quote ---
Wow, you are making this 10x harder than it should be. Spoon feeding time.