ID:164397
 
Ok plz help when i try to make a auto rank system i put src.rank = "genin"
src.level = (10000)
src.rank = "chuunin"
src.level = (15000)
src.rank = "jounin"
src.level = (20000)
src.rank = "anbu"
src.level = (25000)
src.rank = "sannin"
src.level = (50000)
At the bottum of levelup and as soon as i hit log train it makes it the highest automatically doesnt level right plz help me
Eh, try something more like this instead:

if(src.level<=10000)
src.rank = "genin"
if(src.level>=15000)
src.rank = "chuunin"
if(src.level>=20000)
src.rank = "jounin"
if(src.level>=25000)
src.rank = "anbu"
if(src.level>=50000)
src.rank = "sannin"

This will work becuase of the way it is ordered but if you are already a higher rank whenever the check is run it will for s split second change you to each of the ranks before finding the correct one. You can fix this by adding a little bit of code but it's not really needed.

if(src.level<=10000)
src.rank = "genin"
if(src.level>=15000 & src.level<20000)
src.rank = "chuunin"
if(src.level>=20000 & src.level<25000)
src.rank = "jounin"
if(src.level>=25000 & src.level<50000)
src.rank = "anbu"
if(src.level>=50000)
src.rank = "sannin"

That code is longer but fixes what I mentioned earlier. >.<


Nakagawasan wrote:
Ok plz help when i try to make a auto rank system i put src.rank = "genin"
src.level = (10000)
src.rank = "chuunin"
src.level = (15000)
src.rank = "jounin"
src.level = (20000)
src.rank = "anbu"
src.level = (25000)
src.rank = "sannin"
src.level = (50000)
At the bottum of levelup and as soon as i hit log train it makes it the highest automatically doesnt level right plz help me