Login problems.. in Developer Help
|
|
Code:
var/ACiD_Handling/Handle=new ACiD_Handling var savedir="Players" list/access=list("chwgt","cheetoz") characters_allowed=0 proc/DeleteSave(mob/M) if(fexists("./[savedir]/[M.ckey]")) if((M.TimedAlert("Do you really wish to delete your character?","Are you sure?","Yes","No",20))=="Yes") fdel("./[savedir]/[M.ckey]") return 1 return 0 proc/LoadSave(mob/M) if(fexists("./[savedir]/[M.ckey]")) var/savefile/F=new("./[savedir]/[M.ckey]") F["Loc"] >> M.loc Read(F) proc/CreateNew(mob/M) if(fexists("./[savedir]/[M.ckey]")) alert(M,"If you chose to create a new character, your old one will be deleted.") if(Handle.DeleteSave(M)) M.loc=locate(8,6,9) else M.loc=locate(8,6,9) proc/Save(mob/M=src) var/savefile/F=new("./[savedir]/[M.ckey]") F["Loc"] << M.loc Write(F)
mob/var/alert/alert alert proc/Alert(mob/C,msg,win,Opt1="Yes",Opt2="No",seconds) if(!C) return if(seconds)spawn(seconds*10)del(src) var/answer=alert(C,msg,win,Opt1,Opt2) if((answer==Opt1)) return Opt1 return Opt2 mob/proc TimedAlert(msg,win,Opt1="Yes",Opt2="No",seconds=20) if(alert)del(alert) var/alert/Ask=new alert=Ask .=Ask.Alert(src,msg,win,Opt1,Opt2,seconds) del(Ask)
|
Problem description: runtime error: Cannot modify null.loc.
proc name: LoadSave (/ACiD_Handling/proc/LoadSave)
source file: Character Handling.dm,16
usr: null
src: /ACiD_Handling (/ACiD_Handling)
call stack:
/ACiD_Handling (/ACiD_Handling): LoadSave(null)
(8,3,10) (/turf/Login_Stuff/Load_Character): Click( (8,3,10) (/turf/Login_Stuff/Load_Character))
If anyone could help, i'd appreciate it.
|
You can't save and load locations like that. You have to use seperate variables for x,y, and z. Your location is a turf, and everytime the world is opened or close, entirely new turfs are created.
[Edit]
mai msn r generalfalcon33035@hotmail.com
mai aim r superllamalicker
I must speak with you about a library or demo of yours.