ID:145439
 
Code:
mob/proc
Save()
var/cname= ckey(name)
Players.cd= "/[ckey]/[cname]"
Players["name"]<< name
Players["gender"]<< gender
Players["icon"]<< icon
Players["verbs"]<< verbs
Players["location"]<< loc

Load()
Players.cd = "/[ckey]"
var/list/characters = Players.dir
var/list/menu = new()
menu += characters
var/result = input("Which Character do you wish to load?", null, "Which Character?") in menu
Players.cd = "/[ckey]/[result]"
Players["name"] >> name
Players["gender"]>> gender
Players["icon"]>> icon
Players["verbs"]>> verbs
Players["location"]>> loc


Problem description: This is my save system obviously. Yes, very simple right now, but I will accomodate it with better features later. Anyway, when I load my character it loads everything except the verbs. Instead, I get a runtime error saying:

runtime error: Cannot write to atom.verbs.
proc name: Load (/mob/proc/Load)
usr: Teris (/mob/Player/Load_Character)
src: Teris (/mob/Player/Load_Character)
call stack:
Teris (/mob/Player/Load_Character): Load()
Teris (/mob/Player/Load_Character): Login()


Also, when a character is loaded, it doesn't change the location of the player. It just stays in the same spot. How do I fix this? And one final problem: I noticed that, occasionally, variables saved would pop up in the loading list. How do I fix all of this? If you have any recommendations for my system here to make it better, please let me know.

Not really sure about this, but as far as I know, lists are saved differently from other variables, so I am not too sure about it. Maybe if you were to go through Deadron's Character handling library, and see how he did it.
In response to Satans Spawn
You can't understand deadron, I'll tell you! :P
Anyway
mob/var/list/V // Make a new list called V

mob/proc
Load()
blabla make new savefile etc etc
F["V"]>>src.V
for(var/i in src.V) src.verbs+=i
Save()
blablaba ...
src.V=src.verbs
F["V"]<<src.V
In response to Mysame
I'd rather save them as text paths to the verb and add them using text2path. Also, you don't need a permanent variable. Simply create a list in the proc.
In response to CaptFalcon33035
And how would I do that?
In response to Teris