ID:141444
 
Code:
            Sent_out()
for(var/mob/M in world)
if(!M.client)
for(var/mob/O in src.contents)
O.loc = usr.loc
usr.Logblock = 1 //disalows logout and login screen
usr.client.mob = O


            verb
Return()
for(var/mob/M in world)
if(usr.Owner == M.name)
M.Logblock = 1
usr<<"[M] was found"
usr.client.mob = M
M.Logblock = 0
for(var/obj/Pokeball/O in M.contents)
if(O.Capture == usr.name)
usr.loc = O


mob/var
Exists=0

client
proc
Save()
if(!src)return
if(!src.mob)return
var/savefile/save
save = new ("Player Saves/[mob.ckey].sav")
save["mob"] << src.mob
save["x"] << src.mob.x
save["y"] << src.mob.y
save["z"] << src.mob.z
save["Items"] << src.mob.contents
Load()
var/savefile/load
load = new ("Player Saves/[mob.ckey].sav")
load["mob"] >> src.mob
load["x"] >> src.mob.x
load["y"] >> src.mob.y
load["z"] >> src.mob.z
load["Items"] >> src.mob.contents


Problem description: I can't pinpoint the problem but it has something to do with any of these codes....everything works fine untill i save and then load....no matter if i caught or didn't caught the pokemon in the pokeball,everything works fine untill i try the Return() verb...then it just says that it can't modify null.mob.....like the trainer is not a mob anymore or something.

Still nothing....tried a few stuff but don't know how to fix it.
if your saving the mob its contents would also be saved anyway
so you should be able to comment out

save["Items"] << src.mob.contents
load["Items"] >> src.mob.contents


the return system is weird somthing like this should
work nicer.

obj
pokeball
var
mob
owner = null // the owner of the pball
pokemon = null // the pokemon the ball is for
verb
Return()
if(usr == owner)
if(pokemon)
// check here to see if the pokemon type has been got before
returntoowner()
proc
returntoowner()
if(pokemon)
owner << "[pokemon.name] returns to your hand!"
pokemon.loc = src // put the mob for the pokemon directly into the pokeball
src.loc = owner

notes:
untested unchecked but looks ok
not sure how your controling if a player logs out via a exit (not the logout command) and if your auto returning stuff before the save