ID:138926
 
Code:
    proc
Activate(mob/User)
if(ismob(User))
return 1
if(src.Element=="Fire" && User.FireMastery<1000)
User.FireMastery++
if(src.Element=="Water" && User.WaterMastery<1000)
User.WaterMastery++
if(src.Element=="Lightning" && User.LightningMastery<1000)//only one going through.
User.LightningMastery++
if(src.Element=="Earth" && User.EarthMastery<1000)
User.EarthMastery++
if(src.Element=="Wind" && User.WindMastery<1000)
User.WindMastery++


Problem description: For some reason, when I use a Lightning skill, the players 'LightningMastery' increases, yet when I use any other element, their masteries don't. I've been trying to find out what's wrong for the past hour but I really can't find an issue. I've checked everywhere. All the skills have their elements set properly so it's not that. Any suggestions?

Have you checked if the variables defined are correct and the same as the ones of your stats (WaterMastery etc.)
In response to Heyya46
yes
Nothing is supposed to increase because <code>return 1</code> automatically halts the proc. That said, you should check your code elsewhere because you have a bug where you increase LightningMastery outside of Activate().
In response to Toadfish
Toadfish wrote:
Nothing is supposed to increase because <code>return 1</code> automatically halts the proc. That said, you should check your code elsewhere because you have a bug where you increase LightningMastery outside of Activate().

Ah thank you, I've found the source of the problem:)