17.02.2013, 01:13
You should use an array for this, not 4500 switch cases..
Create an array of the score needed for each level, and a string-array for the rank names.
Or more ideally use an enum (which is harder to understand for a beginner).
Create an array of the score needed for each level, and a string-array for the rank names.
pawn Код:
new rankScore[] = {
20,
45,
70
...
};
new rankNames[][] = {
"Private II",
"Private First Class",
"Specialist",
...
};