mob/var/list/saveverbs
client
proc
Save()
var/savefile/F = new("[ckey]'s SavedCharacter.Data")
F << usr
mob.saveverbs = mob.verbs
src << ftp(F)
client/New()
var/mob/new_mob
new_mob = new world.mob()
new_mob.name = key
new_mob.gender = gender
mob = new_mob
var/savefile/G = "[ckey]'s SavedCharacter.Data"
if(length(file(G)))
var/savefile/F = new(G)
F >> usr
for (var/item in mob.saveverbs)
mob.verbs += item
if(usr.Sound == null)
return
usr << sound(usr.Sound,1)
return ..()
this is suppost to save to the client's computer and put a name in it like Shy_guy197's SavedCharacter.... other than new()... dunno if it works but I get an error like this
runtime error: bad file
proc name: Save (/client/proc/Save)
usr: Shy_guy197 (/mob/characters/Chrono)
src: Shy_guy197 (/client)
call stack:
Shy_guy197 (/client): Save()
SavePoint2 (/obj/SavePoint2): Save()
now if I do this with the Save
client
proc
Save()
var/savefile/F = new("[ckey]'s SavedCharacter.Data")
F << usr
mob.saveverbs = mob.verbs
src << ftp(F:icon) //Change this
I get no error... I really dunno if this even works like I want it to ....
If you know of another way to save to the client's computer and it's not like new() (I want it to save to a file with a name)..... then please tell me...</<></<>
ID:267461
May 14 2003, 1:47 pm
|
|
In response to Jinjo21
|
|
mob/var/list/saveverbs
client proc Save() var/savefile/H = new("[ckey]'s SavedCharacter.Data") H["usr"] << usr mob.saveverbs = mob.verbs usr.client.Export(H) client/New() ..() var/savefile/client_file = new("[ckey]'s SavedCharacter.Data") if(client_file) client_file["usr"] >> mob //use this if you want to save ALL of the users vars for (var/item in mob.saveverbs) mob.verbs += item if(mob.Sound == null) ..() usr << sound(usr.Sound,1) I changed the save and load things... if you see it... what happenes if a person without my game saves? |
In response to Jinjo21
|
|
Wow. I was looking for something like that a few monthst back
|
Client side saving