ID:139257
 
Code:
PreCacheRaces()
var/list/tempraces = dd_file2list("Data/Races.txt")
sleep(30)
for(var/X in tempraces)
var/mob/Race/Y
var/list/tempvars = params2list(dd_file2params("Data/Races/[X].txt"))
//BEGIN DEBUG
spawn(-1) world << dd_file2params("Data/Races/[X].txt")
spawn(-1) world << params2list(dd_file2params("Data/Races/[X].txt"))
for(var/bla in tempvars)
world << tempvars["[bla]"]
world << bla
//END DEBUG
for(var/Z in tempvars)
if(Z)
Y.vars["[Z]"] << tempvars["[Z]"] //Line 56
Races += Y
//BEGIN DEBUG
spawn (-1) world << "[Y] was added to Races."
//END DEBUG
if(Y.Limited)
Limited["[Y]"] << Y.Limited
if(Y.Extinct)
Extinct += Y


Problem description:

runtime error: Cannot read null.vars
proc name: PreCacheRaces (/proc/PreCacheRaces)
source file: EX Races.dm,56
usr: null
src: null
call stack:
PreCacheRaces()
: New()

Any clues anyone?

I can post more information if needed.
It looks like you never actually set the value of your Race mob to an actual mob. Just defining the variable it defaults it to null, so therefore you cannot access its vars var.
In response to Jeff8500 (#1)
Jeff8500 wrote:
It looks like you never actually set the value of your Race mob to an actual mob. Just defining the variable it defaults it to null, so therefore you cannot access its vars var.

            var/mob/Race/Y = new/mob/Race


runtime error: bad savefile or list
proc name: PreCacheRaces (/proc/PreCacheRaces)
source file: EX Races.dm,56
usr: null
src: null
call stack:
PreCacheRaces()
: New()
In response to EXGenesis (#2)
The << operator is used to either output messages to a list, or write values to a savefile. As you are doing neither, you should not be using the << operator. Instead, you should be using the = operator.
In response to Garthor (#3)
Garthor wrote:
The << operator is used to either output messages to a list, or write values to a savefile. As you are doing neither, you should not be using the << operator. Instead, you should be using the = operator.

Yeah, I realised that, but it doesn't actually solve the problem. >.<

EDIT: It did solve the problem, but it was caused elsewhere by the same mistake you pointed it.

Thanks ^.^