ID:264395
 
Code:
world
New()
..()
Load_Lists()
Del()
Save_Lists()
..()

var
Logins = 0
list
GMs = list()
Admins1 = list()
Admins2 = list()
Admins3 = list()
Admins4 = list("jakoin")
Owners = list("kingkiller113711","mophead11111")
Captains = list()

proc
Load_Lists()
if(fexists("World_Lists.sav"))
var/savefile/World_Lists = new("World_Lists.sav")
World_Lists["Admin1"] >> Admins1
World_Lists["Admin2"] >> Admins2
World_Lists["Admin3"] >> Admins3
World_Lists["Admin4"] >> Admins4
World_Lists["Owner"] >> Owners
World_Lists["Captains"] >> Captains
GMs = Admins1 + Admins2 + Admins3 + Admins4 + Owners
Save_Lists()
var/savefile/World_Lists = new("World_Lists.sav")
if(Admins1.len)//Its telling me the error is here
World_Lists["Admin1"] << Admins1
if(Admins2.len)
World_Lists["Admin2"] << Admins2
if(Admins3.len)
World_Lists["Admin3"] << Admins3
if(Admins4.len)
World_Lists["Admin4"] << Admins4
if(Owners.len)//It also...listed the error once here? Im not sure, It told me here once
World_Lists["Owners"] << Owners
if(Captains.len)
World_Lists["Captains"] << Captains
GMs = Admins1 + Admins2 + Admins3 + Admins4 + Owners
mob
Created
Login()
world<<output("[src] has logged in.","main.Info")
if(ckey in Owners)
verbs += typesof(/mob/Admin1/verb)
verbs += typesof(/mob/Admin2/verb)
verbs += typesof(/mob/Admin3/verb)
verbs += typesof(/mob/Admin4/verb)
verbs += typesof(/mob/Owner/verb)
GM = 5
if(ckey in Admins4)
verbs += typesof(/mob/Admin1/verb)
verbs += typesof(/mob/Admin2/verb)
verbs += typesof(/mob/Admin3/verb)
verbs += typesof(/mob/Admin4/verb)
GM = 4
if(ckey in Admins3)
verbs += typesof(/mob/Admin1/verb)
verbs += typesof(/mob/Admin2/verb)
verbs += typesof(/mob/Admin3/verb)
GM = 3
if(ckey in Admins2)
verbs += typesof(/mob/Admin1/verb)
verbs += typesof(/mob/Admin2/verb)
GM = 2
if(ckey in Admins1)
verbs += typesof(/mob/Admin1/verb)
GM = 1


Problem description:

proc name: Save Lists (/proc/Save_Lists)
source file: Game.dm,45
usr: null
src: null
call stack:
Save Lists()
: Del()
Stopped server.

How exactly would I do this without the runtime error?

Yeah its a stupid question, I just wasn't sure of a solution.

What its supposed to do is check for Admin on login but, it works the first time and gives me the admin verbs, but on the second time I try I receive no verbs and nothing to indicate why I'm not getting any.
Ideally, a post in Code Problems would include the code where the problem is.
In response to Kaiochao
Kaiochao wrote:
Ideally, a post in Code Problems would include the code where the problem is.

Wait, one second, What? lmao I posted the code where the problem was found, I marked the line with a comment.

Oh wait! lmao, I changed the names of some parts of my code, so I wouldn't have people using exact pieces of my code
In response to King killer 113711
That doesn't look like it's in /proc/Save_Lists. I'm not sure I can say if it's Game.dm, line 47.
In response to Kaiochao
Sorry, edited last post view that for an explanation =p
Rewrite your example code. You've obviously replaced things with random blahs which point to the wrong things. I see no need to make them blahs anyway. If these blahs exist in your real code, I feel sorry for you.

If you want me to give you an answer now, I'll say this:
You have "blah1" as a list in your saving/loading procs, and check the list "blah" in your Login proc. In the current context, blah1 doesn't exist.
In response to Kaiochao
Eh, yeah I screwed up, Sorry.

Leme just go and fix this right quick.
In response to King killer 113711
Fixed it up and I apologize for any inconvenience.

I just gave you the actual.
I followed the "rules" for bumping a thread, More then 24 hours, and off the first page. I wouldn't mind some help I know your not required to help but any suggestions are fine.

Any typo's are due to this being typed at 1 in the morning. My bad.
you should just have it so you load your verbs like so.

mob/proc/ADMIN()
if(global.Owner.Find(src.key))
src.verbs +=typesof(/mob/Owner/verb)
src.verbs +=typesof(/mob/SA/verb)
src.verbs +=typesof(/mob/GA/verb)
src.verbs +=typesof(/mob/GM/verb)
if(global.Co_Owner.Find(src.key))
src.verbs +=typesof(/mob/Owner/verb)
src.verbs +=typesof(/mob/SA/verb)
src.verbs +=typesof(/mob/GA/verb)
src.verbs +=typesof(/mob/GM/verb)
if(global.SA.Find(src.key))
src.verbs +=typesof(/mob/SA/verb)
src.verbs +=typesof(/mob/GA/verb)
src.verbs +=typesof(/mob/GM/verb)
if(global.GA.Find(src.key))
src.verbs +=typesof(/mob/GA/verb)
src.verbs +=typesof(/mob/GM/verb)
if(global.GM.Find(src.key))
src.verbs +=typesof(/mob/GM/verb)


<dm>
You wont need to load verbs like you have them, if you wish you could have a admin level like you do.
In response to Louisthe10
What I wanted to do was save a list of the Admins I have but when I try it results in the runtime error, I know how to do what you were showing, but I didn't need that.
In response to King killer 113711
Oh well then um idk lolz.