SA-MP Forums Archive
Warning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Warning (/showthread.php?tid=345274)



Warning - HighPitchedVoice - 24.05.2012

C:\Documents and Settings\Lindvall\Mina dokument\Mina mottagna filer\QKDM.pwn(336) : warning 203: symbol is never used: "SetPlayerTeamFromClass"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.


pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
    if(classid == 0)
    {
        gTeam[playerid] = TEAM_MAFIA;
        GameTextForPlayer(playerid, "Mafia", 2000, 5);
    }
    else if(classid == 1)
    {
        gTeam[playerid] = TEAM_POLICE;
        GameTextForPlayer(playerid, "Police", 2000, 5);
    }
    else if(classid == 2)
    {
        gTeam[playerid] = TEAM_GROVE;
        GameTextForPlayer(playerid, "Grove", 2000, 5);
    }
    else if(classid == 3)
    {
        gTeam[playerid] = TEAM_BALLAS;
        GameTextForPlayer(playerid, "Ballas", 2000, 5);
    }
    else if(classid == 4)
    {
        gTeam[playerid] = TEAM_BIKERS;
        GameTextForPlayer(playerid, "Bikers", 2000, 5);
    }
    return 1;
}
//------------------------------------------------------------------------------
SetPlayerToTeamColor(playerid)
{
    if(gTeam[playerid] == TEAM_MAFIA)
    {
        SetPlayerColor(playerid, COLOR_MAFIA);
    }
    else if(gTeam[playerid] == TEAM_POLICE)
    {
        SetPlayerColor(playerid, POLICE_COLOR);
    }
    else if(gTeam[playerid] == TEAM_GROVE)
    {
        SetPlayerColor(playerid, GROVE_COLOR);
    }
    else if(gTeam[playerid] == TEAM_BALLAS)
    {
        SetPlayerColor(playerid, BALLAS_COLOR);
    }
    else if(gTeam[playerid] == TEAM_BIKERS)
    {
        SetPlayerColor(playerid, BIKERS_COLOR);
    }
}



Re: Warning - HighPitchedVoice - 24.05.2012

....


Re: Warning - SuperViper - 24.05.2012

You're never using the function 'SetPlayerTeamFromClass'. Either use it in your script or put 'stock' and a space behind it.