ID:1327786
 
(See the best response by Wissam.)
mob/verb/save()
var/FileName="Players/[ckey(src.key)].sav"
if(fexists(FileName))
fdel(FileName)
var/savefile/F=new(FileName)
F["Icon"]<<src.icon
F["Icon State"]<<src.icon_state


Problem description: It always loads nothing. I am invisible.
Well you're not showing the loading...
Loading:

    if(choose=="Load")
if(fexists(FileName))
if(!src.playedandsaved)
src<<"You don't have a filename"
goto BEGIN
F["Icon"]>>src.icon
F["Icon State"]>>src.icon_state
F["Name"]>>src.name
F["Max Hp"]>>src.max_hp
F["Hp"]>>src.hp
F["Nen type"]>>src.nen_type
F["Nen power"]>>src.nen_power
F["Str"]>>src.str
F["Def"]>>src.def
F["X"]>>src.x
F["Y"]>>src.y
F["Z"]>>src.z
F["Genny"]>>src.genny
F["Talent"]>>src.talent
F["Making Character"]>>src.makingcharacter
F["Max Nen Power"]>>src.max_nen_power
F["In gyo"]>>src.ingyo
F["In Ten"]>>src.inten
F["In Zetsu"]>>src.inzetsu
F["In Ren"]>>src.inren
F["In Ken"]>>src.inken
F["Stamina"]>>usr.stamina
F["Max Stamina"]>>usr.maxstamina
F["In en"]>>usr.inen
F["Ko"]>>usr.ko
F["lvl str"]>>usr.lvlstr
F["lvl def"]>>usr.lvldef
F["lvl hp"]>>usr.lvlhp
F["lvl sta"]>>usr.lvlsta
F["Banned"]>>usr.banned
if(src.banned)
alert("You are banned")
del src
else goto BEGIN
It doesn't immediately look like anything should be up there (I don't save/load icons personally, not sure if it's possible but I'd assume it is), maybe you're setting their icon to something null elsewhere?
Best response
Do you mean the overlays and not the icon?
And start using
Read()
//and
Write()

To start managing your savefiles.
"Icon" isn't the same as "icon" especially when dealing with associative lists.

You need to change "Icon" to "icon", "Icon State" to "icon_state"
In response to FIREking
FIREking wrote:
"Icon" isn't the same as "icon" especially when dealing with associative lists.

You need to change "Icon" to "icon", "Icon State" to "icon_state"

Well, no, the text string is just an identifier, it doesn't actually matter what it is. For example many games with client sided saves use random hashes for the text identifier to make it harder to decrypt.
Oh yeah you're right sorry I just glanced there. As long as you read from the same name you saved with!
? I'm not sure why you have the call to goto in there. To me it just seems like it would continuously loop through the save process. But that would also depend on where "BEGIN" is placed.
the goto and the fact that you load everything then check if they are banned hurts me deeply, please move the ban check to the beginning of the load at least :(
Perhaps try something like this
var/icon/I
F["Icon"]>>I
src.icon=I
F["Icon State"]>>src.icon_state

I don't know why the way you currently have wouldn't already work, but that might be worth a shot.
I have this same issue can someone please help?