12.02.2011, 11:19
The solution above won't work either.
pawn Код:
stock Faction(playerid)
{
new
Tmp[10] = "Nothing"; // You never created a string for "Tmp" - "Nothing" will be returned if the switch statement sets nothing
if(PlayerInfo[playerid][pFactionID] == 1) { // You can't put if statements loosely inside switch statements
switch(PlayerInfo[playerid][pFactionStat]) {
case 0: Tmp = "Non-Cadet";
case 1: Tmp = "Cadet2";
case 2: Tmp = "Cadet3";
case 3: Tmp = "Cadet4";
case 4: Tmp = "Cadet5";
}
}
return Tmp; // Return an actual string now!
}