//What Species?
ans=input("What species would you like?") in list("Human", "Mutant", "Genie", "Int Insect")
var/attrolls[6]
species = ans
switch(ans)
if("Human")
for(var/i = 1; i<=6; i++)
attrolls[i]=roll("3d6")
if("Mutant")
for(var/i = 1; i<=4; i++)
attrolls[i]=roll("3d6")
attrolls[5]=roll("5d6")
attrolls[6]=roll("1d6")
if("Genie")
for(var/i = 1; i<=4; i++)
attrolls[i]=roll("3d6")
attrolls[5]=roll("4d6")
attrolls[6]=roll("2d6")
if("Int Insect")
for(var/i = 1; i<=6; i++)
if(i<=3) attrolls[i]=roll("4d6")
else attrolls[i]=roll("2d6")
//What race?
var/list/attrl = dd_sortedObjectList(attrolls)
Problem description:
The above code generates 6 attribute scores depending on species chosen. I need to sort those scores, and I am trying to use Deadron's List lib. I make the call to dd_sortedObjectList with a list I know contains the numbers (I ran a for loop once just to make sure) At runtime, I get the following error:
runtime error: Cannot execute null.dd SortValue().
proc name: dd sortedObjectList (/proc/dd_sortedObjectList)
source file: List.dm,73
usr: Neo Skye (/mob/player)
src: null
call stack:
dd sortedObjectList(/list (/list))
Neo Skye (/mob/player): Topic("createchar", /list (/list))
am I using the list wrong? is this a bug with the lib? any help is much appreciated.
~X