ID:141461
 
Code:
        TestSave()
var/savefile/F = new()//make a new one
rank = md5("newbie")
F["usr"] << usr
usr.client.Export(F)

// File seperation here

client/New()
..()
var/savefile/client_file = new(Import())
if(client_file)
client_file["usr"] >> mob

return ..()


Problem description:

It doesn't work.. In the demo I acquired it from it works perfectly. I've tried to use it, reproduced it, hell even make the variables the original uses, the original is as follows.

mob/var/saved = 0
mob/var/money = 0
mob/var/description
/* Below is the code for saving the file */

mob/verb/save()
var/savefile/F = new()//make a new one
// F["usr"] << usr// use this if you want to save ALL the vars
F["saved2"] << saved
F["money"] << money
F["description"] << description
usr.client.Export(F)


/* Below is the code for loading the saved file */

client/New()
..()
var/savefile/client_file = new(Import())
if(client_file)
// client_file["usr"] >> mob //use this if you want to save ALL of the users vars
client_file["saved2"] >> mob.saved
client_file["money"] >> mob.money
client_file["description"] >> mob.description



return ..()


Since the code above is all out dated. I haven't found any means to be up to date. Any or all assistance is appreciated.

What exactly is happening when you try loading it up? anything like it says you've logged out then logged back in again?
I believe client-side saving can only function properly if you have world/hub set. The location of the file is based on that.
In response to Nadrew
Nadrew wrote:
I believe client-side saving can only function properly if you have world/hub set. The location of the file is based on that.

All this is already set. I read the documentation. Don't think like I haven't. I've been around byond long enough for that much.

Also something wierd happens, it kicks the mob out and then logs the mob in again. I don't know. the demo I retrieved it from works just fine, and doesn't do this.
In response to SSJCoop
SSJCoop wrote:
What exactly is happening when you try loading it up? anything like it says you've logged out then logged back in again?

Well yes, but it vanishes when I set a mob, and fix everything properly, but the client issue still persists.
I haven't figured anything out, this is a bump, for being on the next page.
Fusioneko wrote:
Code:
>       TestSave()
> var/savefile/F = new()//make a new one
> rank = md5("newbie")
> F["usr"] << usr
> usr.client.Export(F)
>
> // File seperation here
>
> client/New()
> ..()
> var/savefile/client_file = new(Import())
> if(client_file)
> client_file["usr"] >> mob
>
> return ..()
>


Is the indentation correct?

also the demo you retrieved from didn't load a new mob, just variables.