var
Players
mob
proc
Save()
var/savefile/F = new("players/[src.key].sav")
src.V = src.verbs
src.pokemonstuff = src.pokemonlist
S["X"] << src.x
S["Y"] << src.y
S["Z"] << src.z
S["Name"] << src.name
S["Icon"] << src.icon
S["IconState"] << src.icon_state
S["dir"] << src.dir
Write(F)
src << "<font color=blue><b>Your game has been saved!"
mob
proc
LoadPlayer()
if(fexists("players/[usr.key].sav"))
var/savefile/F = new("players/[src.key].sav")
Read(F)
for(var/stuff in usr.V)
usr.verbs += stuff
for(var/mob/Pokemon/P in usr.pokemonstuff)
usr.pokemonlist = usr.pokemonstuff
for(var/mob/Pokemon/P in usr.pokemonlist)
P:owner=usr
world << "<font color=#000046><B>Info: <font color=silver>[src]([src.key]) has logged in..."
S["X"] >> src.x
S["Y"] >> src.y
S["Z"] >> src.z
S["Name"] >> src.name
S["Icon"] >> src.icon
S["IconState"] >> src.icon_state
S["dir"] >> src.dir
turf
New
density = 1
layer = 999
Click()
//usr.loc = locate(10,10,1)
usr.Save()
var/name = input("","Name") as text|null
if(length(name) > 25)
usr << "No HTML, and names like that are too long"
return
if(length(name) < 1)
usr << "You must have A name."
return
usr.name="[html_encode(name)]"
usr.Change_Icon()
usr.loc=locate(7,7,3)
usr.Save()
turf
Quit
density=1
layer=999
Click()
del(usr)
mob
verb
Savenow()
set name = "Save"
usr.Save()
mob/var/list
V
pokemonstuff
atom/movable/var
xco=0
yco=0
zco=0
turf
Load
density = 1
layer = 999
Click()
usr.LoadPlayer()
mob
proc
DeleteChar()
if(fexists("players/[src.key].sav"))
var/sure=alert(src,"Are you sure you want to delete your character?","Confirmation","No","Yes")
if(sure=="Yes")
sleep(0)
fdel("players/[src.key].sav")
src << "Character Deleted"
else
src << "Canceled deleting '[src.key].sav'"
else
src << "You do not have a character saved on this server."
turf
Delete
density = 1
layer = 999
Click()
usr.DeleteChar()
mob
Logout()
Players -= 1
world << "<font color=green>[src.name] has logged out!"
Alright heres the run down of the issue, whenever a player saves and logs back in, all of their pokemon (its a pokemon game) are gone. I want to know how to fix this, any idea?
fgsfdsfsdf