ID:261895
 
I have a procedure named "LearnSkill(mob/M, T)" with two arguments. Here is the whole thing inside of it.

LearnSkill(mob/M, T)
if(!(locate(T) in M.skills))
M << "You have [pick("aquired the skill","gained the knowledge of")] [new T]"
M.skills += new T

My skills variable is like this:

mob/var/list/skills = newlist(/obj/battle/menu/Attack, /obj/battle/menu/Thornwhip)

I used the LearnSkill() procedure like this:

if(src.str >= 16)
LearnSkill(src, /obj/battle/menu/Thornwhip)

The problem is that I'm learning Thornwhip every levelup. I'm thinking there is a problem at the "if(!(locate(T) in M.skills))" part and it isn't working.

Thanks in advance,

Unknown Person <<