ID:143510
 
Code:
mob/proc
Rankup()
if(src.rankpoints >= src.maxrankpoints)
if(src.rank=="Crewman")
src.rank="Ensign"
src.rankpoints=0
src.maxrankpoints+=20
if(src.rank=="Ensign")
src.rank="Lieutenant Junior Grade"
src.rankpoints=0
src.maxrankpoints+=50
if(src.rank=="Lieutenant Junior Grade")
src.rank="Lieutenant"
src.rankpoints=0
src.maxrankpoints+=50
if(src.rank=="Lieutenant")
src.rank="Lieutenant Commander"
src.rankpoints=0
src.maxrankpoints+=100
if(src.rank=="Lieutenant Commander")
src.rank="Commander"
src.rankpoints=0
src.maxrankpoints+=150
if(src.rank=="Commander")
src.rank="Captain"



mob/verb
up()
if(usr.rank=="Captain")
usr.rankpoints=0
else
usr.rankpoints+=10
usr.Rankup()


Problem description:

I made the "up" verb just to see if it worked.

Anyhow, the problem is, you start out as a crewman, but instead of going to ensign, you go straight to captain.

Anyone know what the problem is?

Nevermind, fixed it using "else if" instead of just "if"s. Thanks anyway ^_^
In response to GohanIdz
And there's also a much shorter way of doing this using Defines and Lists.