runtime error: Cannot read null.mob
proc name: Save (/mob/proc/Save)
usr: Delita12345 (/mob)
src: Delita12345 (/mob)
call stack:
Delita12345 (/mob): Save()
Delita12345 (/mob): CreateNewChar()
Delita12345 (/mob): Login()
the code is
mob
Login()
..()
if(src.created == 1)
src.Load()
..()
else
src.CreateNewChar()
proc
Save()
var/key_letter = copytext(src.key,1,2)
var/safe_name = ckey(src.key)
var/savefile/F = new("Players/[key_letter]/[safe_name].sav")
F["mob"] << src.client.mob
Load()
var/key_letter = copytext(src.key,1,2)
var/safe_name = ckey(src.key)
var/savefile/F = new("players/[key_letter]/[safe_name].sav")
F["mob"] >> src.client.mob
CreateNewChar()
var/char_name = input("What is your name?","Character Creation",src.key)
var/list/avatars = list("Lan","Mayl","Dex","Yai","Chaud")
var/mob/character
var/avatar = input(src,"Which avatar would you like?","Character Creation") in avatars
switch(avatar)
if("Lan")
character = new /mob/GM()
if("Mayl")
character = new /mob/avatar/Mayl()
if("Yai")
character = new /mob/avatar/Yai()
if("Dex")
character = new /mob/avatar/Dex()
if("Chaud")
character = new /mob/avatar/Chaud()
character.name = char_name
character.key = src.key
src.Save()
return ..()