ID:264629
 
Code:
world
New()
if(fexists("Configuration.sav"))
var/savefile/F = new("Configuration.sav")
F["status"]>>world.status
F["SubList"]>>SubList
F["SubCount"]>>SubCount


world
Del()
var/savefile/F = new("Configuration.sav")
F["status"]<<world.status
F["SubList"]<<SubList
F["SubCount"]<<SubCount
return ..()

mob/verb/View_Subscribers()
set name = "View Subscribers"
set category = "Commands"
var/html = {"
<table border=2 cellspacing=0 cellpadding=2 bordercolor="blue">
<head><title>Subscribers List</title></head>
<body bgcolor=darkblue><center><table bgcolor=black border>
<tr><td colspan=100%><font color = white><center><b>Subscription List</td></tr>
<tr><td colspan=100%><font color = white><center><b>Subscription Count:
[SubCount]</td></tr>
<tr><td colspan=100%><font color = white><center><b>Current Date:
[ReportDay(world.time)]</td></tr>

<tr><td><font color = white><b>Key<th></tr>"}


for(var/V in SubList)
html+={"<tr><td><b><font color = white>[V]</td></tr>"}

src << browse(html,"size=400x360,window=Updates")

mob/GM/verb/Give_Temp_Sub()
set category = "Administration"
set name = "Give Temporally Sub"
var/list/L=list()
for(var/mob/M in world) if(M.client) L+=M
var/mob/M=input("Select Player to Give Temporally Sub","Give Temporally Sub") as null|anything in L
world<<"<font color = blue><b>GM: </font><b>[M] has been Given Temporally Subscription to Gohan Games by [usr]"
M.Subscriber=1
SubList+=M.key
SubList.Add(M.key)
SubCount+=1


Problem description: Well, This is Maybe Simple but it sends a Runtime.

runtime error: Cannot execute null.Add().
proc name: Give Temporally Sub (/mob/GM/verb/Give_Temp_Sub)
source file: Administrative Verbs.dm,69
usr: Gohan Games (/mob)
src: Gohan Games (/mob)
call stack:
Guest-2466717403 (/mob): Give Temporally Sub()



The problem is that the list is being loaded at the start of the world - and the first time it does this, it will always not be in the savefile, and will be loaded as null. What you need to do is, after loading the list from the savefile, check to see if it's null; if it is, you need to initialize the list again.

world
New()
if(fexists("Configuration.sav"))
var/savefile/F = new("Configuration.sav")
F["status"]>>world.status
F["SubList"]>>SubList
F["SubCount"]>>SubCount
if(SubList==null)
SubList=list()
In response to Devourer Of Souls
I Did it But Nothing, it dont work.