stock
#5

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!
}
Reply


Messages In This Thread
stock - by NewbBeginner - 12.02.2011, 10:34
Re: stock - by Mean - 12.02.2011, 11:06
Re: stock - by NewbBeginner - 12.02.2011, 11:11
Re: stock - by xxmitsu - 12.02.2011, 11:17
Re: stock - by __ - 12.02.2011, 11:19

Forum Jump:


Users browsing this thread: 1 Guest(s)