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
ID:164397
Jun 15 2007, 7:26 pm
|
|
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: