mob/verb/save()
if(usr.inzoid) return
// Save File Hashing
var/temp1=usr.cashz
var/temp2=0
for(var/obj/Zoids/ztemp in usr.zoidlist)
temp2+=ztemp.zbaseap
temp2+=ztemp.zbasecp
temp2+=ztemp.zbasemob
temp2+=ztemp.zbasedod
temp2+=ztemp.zbasewep
temp2+=ztemp.zbasesub
temp2+=ztemp.flying
temp2+=ztemp.zbasemeleepower
for(var/obj/Weapons/wtemp in ztemp.weaponlist)
temp2+=wtemp.power
temp2+=wtemp.baseammo
temp2+=wtemp.range
temp2+=wtemp.weight
temp2+=wtemp.homing
temp2+=wtemp.sniper
temp2+=wtemp.firedelay
temp2+=wtemp.maximum
for(var/obj/Subparts/sub in usr)
temp2+=sub.apmod
temp2+=sub.cpmod
temp2+=sub.mobmod
temp2+=sub.dodmod
temp2+=10458190
var/temp4=temp1*temp2
if(usr.savedonce!=1)
usr.savedonce=1
usr.useruniquecode="[temp4]"
// End Save File Hashing
var/savefile/F = new()//make a new one
// F["usr"] << usr// use this if you want to save ALL the vars
F["usr"] << src
src.client.Export(F)
src << "Your data has been successfully saved."
/* 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["usr"] >> src
Problem description:
From my previous post about this, I have figured out the problem. It seems to be saving everyone (or certain people) in the save file along with the saver. Maybe I'm not seeing it... any ideas?
isnt it supposed to be
I'm not the best coder i'll admit so if i'm wrong.. sorry :( but i tried!