Max_Coldheart
Unregistered
Quote:
Originally Posted by '[HLF
pawn Code:
new const aRankNames[MAX_NUMBER_OF_RANKS][LONGEST_RANK_NAME_STRING_LENGTH]= { "Newbie", "Next Rank", "Chuck Norris" }
// Then return a rank name like this
printf("Rank 2: %s", aRankNames[2]); // Will print: "Rank 2: Chuck Norris"
|
Sorry for quoting you, but you could also tell him why it's returning "Chuck Norris", even though the "Next Rank" seems to be the second one. This is because in programming & scripting, the compiler starts variables from number 0. So basicly "Newbie" would be 0, "Next Rank" is 1, and "Chuck Norris" is 2. This is why it returns "Chuch Norris" instead of "Next Rank".