ID:141802
 
Code:
//style check
proc/style_check(mob/M as mob)
if (src.power) //power/strength
usr.strengthexp += 4
usr.hpexp += 1
//p.s when adding return here it gives exp to strength regardless of whats selected
if(src.strengthexp >= src.maxstrengthexp)//if the players exp matches or is higher then the players maxexp
src.str_stat_up()
if(src.hpexp >= src.maxhpexp)
src.hp_stat_up()
if(src.accurate) //accurate
usr.attackexp +=4
usr.hpexp += 1
if(src.hpexp >= src.maxhpexp)
src.hp_stat_up()
if(src.attackexp >= src.maxattackexp)// the players exp matches or is higher then the players maxexp
src.atk_stat_up()

if(src.defend) //defend
usr.defenseexp +=4
usr.hpexp += 1
if(src.defenseexp >= src.maxdefenseexp)// the players exp matches or is higher then the players maxexp
src.def_stat_up()
if(src.hpexp >= src.maxhpexp)
src.hp_stat_up()
else
return


Problem description:im trying to make it so when style check is activated it checks what training style you are using then distrubites experiance accordingly but so far its just giving exp to all styles if you would like to see anymore snippets of code let me know

Post the code that calls style_check. If its not as messed up as that code and I can figure out exactly what its trying to do I will post a fix.
No put usr in proc. Ungh.