In other words, you have :"KNIGHT/BLACK BELT/THIEF/RED MAGE/WHITE MAGE/BLACK MAGE/", you have a value for X, and X can be 0, 1, 2, 3, 4, or 5, correct? 0=KNIGHT, 1=BLACK BELT, ..., 5=BLACK MAGE? Here's how I would do it:
Code: :{Assume X is already set}
:"KNIGHT/BLACK BELT/THIEF/RED MAGE/WHITE MAGE/BLACK MAGE/->Str0
:DelVar PWhile X
:inString(Str0,"/",P+1->P
:X-1->X
:End
:{Now P+1 is the first letter of the substring we need}
:inString(Str0,"/",P+1->Q
:{Now Q is the letter after the last letter of the substring
:sub(Str0,P+1,Q-P-1
:{Ans now holds the class name, if I did this right}
Now, a small optimization:
Code: :{Assume X is already set}
:"KNIGHT/BLACK BELT/THIEF/RED MAGE/WHITE MAGE/BLACK MAGE/->Str0
:DelVar PWhile X
:inString(Str0,"/",P+1->P
:X-1->X
:End
:{Now P+1 is the first letter of the substring we need}
:sub(Str0,P+1,{-}P-1+inString(Str0,"/",P+1
:{Ans now holds the class name, if I did this right}