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.
mob/verb/save() Problem description: It always loads nothing. I am invisible. |
![]() Jul 18 2013, 10:41 am
|
|
Well you're not showing the loading...
|
Loading:
if(choose=="Load") |
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?
|
Do you mean the overlays and not the icon?
And start using Read() 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" |
FIREking wrote:
"Icon" isn't the same as "icon" especially when dealing with associative lists. 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 I don't know why the way you currently have wouldn't already work, but that might be worth a shot. |