SA-MP Forums Archive
1 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 1 Warning (/showthread.php?tid=232911)



1 Warning - Markx - 28.02.2011

I got this:

pawn Код:
C:\Users\Marko\Documents\Server\gamemodes\FreeRoam.pwn(636) : warning 203: symbol is never used: "SetPlayerTeamFromClass"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.


pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerInterior(playerid,17);
    SetPlayerPos(playerid,486.0409, -9.4562, 1000.6719);
    SetPlayerFacingAngle(playerid, 137.9666);
    SetPlayerCameraPos(playerid, 483.809051, -13.435981, 1000.679687);
    SetPlayerCameraLookAt(playerid, 486.0409, -9.4562, 1000.6719);
    ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
    return 1;
}

SetPlayerTeamFromClass(playerid, classid)
{
    if(classid == 0)
    {
        gTeam[playerid] = ARMY;
        GameTextForPlayer(playerid, "~r~~r~~r~Army", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
    if(classid == 1)
    {
        gTeam[playerid] = ARMY;
        GameTextForPlayer(playerid, "~r~~r~~r~Army", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    if(classid == 2)
    {
        gTeam[playerid] = ARMY;
        GameTextForPlayer(playerid, "~r~~r~~r~Army", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
    else if(classid == 3)
    {
        gTeam[playerid] = COPS;
        GameTextForPlayer(playerid, "~b~~b~~b~Cops", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
    if(classid == 4)
    {
        gTeam[playerid] = COPS;
        GameTextForPlayer(playerid, "~b~~b~~b~Cops", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
    if(classid == 5)
    {
        gTeam[playerid] = COPS;
        GameTextForPlayer(playerid, "~b~~b~~b~Cops", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    if(classid == 6)
    {
        gTeam[playerid] = COPS;
        GameTextForPlayer(playerid, "~b~~b~~b~Cops", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
    else if(classid == 7)
    {
        gTeam[playerid] = MAFIA;
        GameTextForPlayer(playerid, "~w~~w~~w~Mafia", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
    if(classid == 8)
    {
        gTeam[playerid] = MAFIA;
        GameTextForPlayer(playerid, "~w~~w~~w~Mafia", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    if(classid == 9)
    {
        gTeam[playerid] = MAFIA;
        GameTextForPlayer(playerid, "~w~~w~~w~Mafia", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
    else if(classid == 10)
    {
        gTeam[playerid] = TERRORISTS;
        GameTextForPlayer(playerid, "~y~~y~~y~Terrorists", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
    if(classid == 11)
    {
        gTeam[playerid] = TERRORISTS;
        GameTextForPlayer(playerid, "~y~~y~~y~Terrorists", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
    if(classid == 12)
    {
        gTeam[playerid] = TERRORISTS;
        GameTextForPlayer(playerid, "~y~~y~~y~Terrorists", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    else if(classid == 13)
    {
        gTeam[playerid] = CIVILIANS;
        GameTextForPlayer(playerid, "~g~~g~~g~Civilian", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
    if(classid == 14)
    {
        gTeam[playerid] = CIVILIANS;
        GameTextForPlayer(playerid, "~g~~g~~g~Civilian", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
    if(classid == 15)
    {
        gTeam[playerid] = CIVILIANS;
        GameTextForPlayer(playerid, "~g~~g~~g~Civilian", 1000, 6);
        ApplyAnimation(playerid,"DANCING","dance_loop", 4.1,1,1,1,1,1);
        return 1;
    }
}
The error line is on the end, no code..

Thanks for any help.


Re: 1 Warning - Max_Coldheart - 28.02.2011

Its just warning Because You have only made it, not used. Ignore it


Re: 1 Warning - Markx - 28.02.2011

Yeah but the game text isnt showing up


Re: 1 Warning - Max_Coldheart - 28.02.2011

You have same gTeam's in 3 different places & cases. That may cause it?


Re: 1 Warning - Markx - 28.02.2011

cuz i have like 3 skins of Army, 3 skins of cops etc...


Re: 1 Warning - Max_Coldheart - 28.02.2011

Why You have 2 "if" statements after "else if"?


Re: 1 Warning - Markx - 28.02.2011

Quote:
Originally Posted by Max_Coldheart
Посмотреть сообщение
Why You have 2 "if" statements after "else if"?
Fixed that