ID:261932
 
Yet another question, so here it goes.

I have a mob that has skills in it. If it has a skill with the "bumpuse" var as 1, it works properly. Otherwise, it just gives me a runtime error pointing to the second-last line, with if(L). The funny thing is that L is an empty list so it shouldn't be calling that... Any way I can fix this?


var/obj/battle/menu/B
var/obj/battle/menu/C
var/list/L = newlist()
for(B in src.skills)
if(B.bumpuse)
L += B
if(L)
C = pick(L)
C.Doit(src, P)

Thanks in Advance,

Unknown Person <<
If L = list(), then L is true.

Try checking L.len
In response to Foomer
Thanks, Foomer.