mob
proc
load()
if(!src)
return
if(src.joe)
return
if(fexists("players/[usr.key]"))
var/savefile/load
load = new ("players/[usr.key]")
load["mob"] >> usr
load["x"] >> usr.x
load["y"] >> usr.y
load["z"] >> usr.z
world<<"<font size=1><font color=yellow><B>Info:<font color = silver> [usr] has logged on the server."
usr.joe = 1
usr.invisibility = 0
//skip half the code
usr.OOC = 1
usr.cansave=1
usr.frozen = 0
usr.defence = usr.mdefence
usr.attack = usr.mattack
del(src)
usr.AutoSave()
if(usr.invai)
usr.invai = 0
usr.loc = locate(73,29,5)
if(usr.race == "UNID")
usr.rundelay = 0
return
obj
save
name = "Save"
icon = 'bars.dmi'
screen_loc = "12,1"
icon_state = "save"
layer = MOB_LAYER+101
Click()
var/savefile/save
save = new ("players/[usr.key]")
save["mob"] << usr
save["x"] << usr.x
save["y"] << usr.y
save["z"] << usr.z
usr << "<font color=red><b>Your game has been saved!"
Problem description:
Ok heres the thing no matter what i do i cant save their attack/defence or mattack/defence i tried to save[usr.attack] << usr.attack but i just get a messed up prob when i log in with runtime error blah blah any suggestions how to save their stats then load them again later? or do you need more code? though i doubt the other code will come in handy considering it has nothing pertaining to stats in it.