/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist
var/list/Lines = file2list(filename)
for(var/t in Lines)
if(!t) continue
t = trim(t)
if(length(t) == 0)
continue
else if(copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
var/value = null
if(pos)
name = lowertext(copytext(t, 1, pos))
value = copytext(t, pos + 1)
else
name = lowertext(t)
if(!name)
continue
if(type == "config")
switch(name)
if("download_external")
client/preload_rsc = "value"
-snipped-
Problem description:
I'm trying to make preload_rsc be toggled whether its in the configuration file. When client/preload_rsc is used outside of a proc it works fine and compiles. However when its inside a proc i get this error
client/preload_rsc: undefined var
so, client.preload_rsc