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

GenerateRaceSelection()
var/list/L = new/list
//BEGIN DEBUG
for(var/X in Races)
world << X
//END DEBUG
for(var/mob/Race/X in Races)
world << "[X] found."
if(!CheckLimit(X.Race) && !CheckExtinct(X.Race))
L += X
//BEGIN DEBUG
world << "[X] added to Race Selection."
return L


Problem description:

GenerateRaceSelection() never displays any found Races even when PreCacheRaces() says a Race was added.

Any ideas?

EDIT: Like an idiot I forgot to define the Races list as new/list()