ID:2228001
 
Code:
var/list/extrabonus=list("Self Destruct","Defence Break","Bolster","No Guard","Double Hit","Life Steal","Thorned","Block Breaker","Sticky","Slippery","Nimble")


obj
Weapon
New()
..()
truename=name
GeneratePrefix()//Being called
GetExtra()//not being called


proc
GetExtra()
var/size=rand(1,length(extrabonus))
extra=extrabonus[size]
if(extra=="Self Destruct")
if(prob(50)) extra=extrabonus[size]
world<<"[src] extra-[extra]"//this message doesn't show up so this is a testament to the fact that the proc isnt being called
extra2=extrabonus[size]
if(extra2=="Self Destruct")
if(prob(50)) extra2=extrabonus[size]
while(extra2==extra)
world<<"1"
extra2=extrabonus[size]
sleep(1)
world<<"[src] extra2-[extra2]"//doesnt show up either

GeneratePrefix()
var/num=rand(1,4)
switch(tier)
if(0) prefix=pick(prob(75);weakprefix[num],prob(5);normalprefix[num])
if(1) prefix=pick(prob(50);weakprefix[num],prob(35);normalprefix[num],prob(15);goodprefix[num],prob(5);bestprefix[num])
if(2) prefix=pick(prob(35);weakprefix[num],prob(40);normalprefix[num],prob(25);goodprefix[num],prob(10);bestprefix[num])
if(3) prefix=pick(prob(25);weakprefix[num],prob(50);normalprefix[num],prob(30);goodprefix[num],prob(15);bestprefix[num])
if(4) prefix=pick(prob(15);weakprefix[num],prob(55);normalprefix[num],prob(35);goodprefix[num],prob(25);bestprefix[num])
if(5) prefix=pick(prob(5);weakprefix[num],prob(25);normalprefix[num],prob(55);goodprefix[num],prob(35);bestprefix[num])
name="[prefix] [truename]"


Problem description:
The proc "GetExtra()" isn't being called at all, and I have no idea why.

Ah, was a silly problem, no need to bother to answer this anymore.
What was the problem? It might help others to know.
1) extrabonus had to be declared under obj
2) 'GetExtra()' was an infinite loop due to the value of 'size' not being changed
In response to Cheesy pants
Cheesy pants wrote:
2) 'GetExtra()' was an infinite loop due to the value of 'size' not being changed

I tried testing this myself and had to define the variables it required including size but with it not set to a value it just kept outputting 1 :P
In response to Kozuma3
Yeah, the output of 1 was something I had put in to see how much of the proc was being called, since I was getting no error messages I debugged like that line by line :c

You were able to fix it that's what counts. :)