Problem with SetPlayerToTeamColor
#1

As the title says!

pawn Код:
}

    SetPlayerToTeamColor(playerid)
    {
    if (gTeam[playerid] == TEAM_CLOWNS); //
    {
        SetPlayerColor(playerid, Clowns);
    }
    else if (gTeam[playerid] == TEAM_HOBOS); //
    {
        SetPlayerColor(playerid, Hobos);
    }
    else if(gTeam[playerid] == TEAM_Army);
    {
        SetPlayerColor(playerid, Army);
    }
    else if(gTeam[playerid] == TEAM_Cops);
    {
        SetPlayerColor(playerid, Cops);
    }
    return 1;
}
I have it under OnPlayerRequestClass

Код:
C:\Users\Davve\Desktop\Scripting\Server Las Venturas\LV.pwn(858) : warning 203: symbol is never used: "SetPlayerToTeamColor"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Thanks alot for help!.
Reply
#2

Код:
}

    if (gTeam[playerid] == TEAM_CLOWNS); //
    {
        SetPlayerColor(playerid, Clowns);
    }
    else if (gTeam[playerid] == TEAM_HOBOS); //
    {
        SetPlayerColor(playerid, Hobos);
    }
    else if(gTeam[playerid] == TEAM_Army);
    {
        SetPlayerColor(playerid, Army);
    }
    else if(gTeam[playerid] == TEAM_Cops);
    {
        SetPlayerColor(playerid, Cops);
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by yusei
Посмотреть сообщение
Код:
}

    if (gTeam[playerid] == TEAM_CLOWNS); //
    {
        SetPlayerColor(playerid, Clowns);
    }
    else if (gTeam[playerid] == TEAM_HOBOS); //
    {
        SetPlayerColor(playerid, Hobos);
    }
    else if(gTeam[playerid] == TEAM_Army);
    {
        SetPlayerColor(playerid, Army);
    }
    else if(gTeam[playerid] == TEAM_Cops);
    {
        SetPlayerColor(playerid, Cops);
    }
    return 1;
}
Thanks alot I will try it!
Reply
#4

C:\Users\Davve\Desktop\Scripting\Server Las Venturas\LV.pwn(85 : warning 203: symbol is never used: "SetPlayerToTeamColor"

to get rid of it go to onplayerspawn and write
SetPlayerToTeamColor(playerid); when it will be used, then u wont able to see the warning
Reply
#5

Quote:
Originally Posted by XtremeR
Посмотреть сообщение
C:\Users\Davve\Desktop\Scripting\Server Las Venturas\LV.pwn(85 : warning 203: symbol is never used: "SetPlayerToTeamColor"

to get rid of it go to onplayerspawn and write
SetPlayerToTeamColor(playerid); when it will be used, then u wont able to see the warning
I tried!, thanks alot .

But now I get this instead:

Код:
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV.pwn(599) : error 029: invalid expression, assumed zero
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV.pwn(599) : warning 215: expression has no effect
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV.pwn(599) : error 001: expected token: ";", but found "if"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV.pwn(599) : error 036: empty statement
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV.pwn(599) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#6

Paste line 599 please.
Reply
#7

pawn Код:
SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_CLOWNS); //
    {
        SetPlayerColor(playerid, Clowns);
    }
    else if (gTeam[playerid] == TEAM_HOBOS); //
    {
        SetPlayerColor(playerid, Hobos);
    }
    else if(gTeam[playerid] == TEAM_Army);
    {
        SetPlayerColor(playerid, Army);
    }
    else if(gTeam[playerid] == TEAM_Cops);
    {
        SetPlayerColor(playerid, Cops);
    }
    return 1;
}
replace it with that and ummm remember to input this where the on playerspawn or somewhere else
Reply
#8

Sorry for bumb but I forgot the topic..

Anyway: Still the same problem if I write

SetPlayerToTeamColor(playerid);

And place it under OnPlayerSpawn, I get:

pawn Код:
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV - Kopia.pwn(600) : error 036: empty statement
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV - Kopia.pwn(604) : error 029: invalid expression, assumed zero
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV - Kopia.pwn(604) : warning 215: expression has no effect
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV - Kopia.pwn(604) : error 001: expected token: ";", but found "if"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV - Kopia.pwn(604) : error 036: empty statement
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV - Kopia.pwn(604) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
And if I delete it I get:

(delete that under OnPlayerSpawn)
I get this:
pawn Код:
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV - Kopia.pwn(859) : warning 203: symbol is never used: "SetPlayerToTeamColor"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Reply
#9

pawn Код:
SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_CLOWNS)
    {
        SetPlayerColor(playerid, Clowns);
    }
    if (gTeam[playerid] == TEAM_HOBOS)
    {
        SetPlayerColor(playerid, Hobos);
    }
    if(gTeam[playerid] == TEAM_Army)
    {
        SetPlayerColor(playerid, Army);
    }
    if(gTeam[playerid] == TEAM_Cops)
    {
        SetPlayerColor(playerid, Cops);
    }
    return 1;
}
I just remembered when using "if" u cannot have any of these ";" after the statement.

pawn Код:
//under onplayerspawn put this
SetPlayerToTeamColour(playerid);
Reply
#10

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
pawn Код:
SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_CLOWNS)
    {
        SetPlayerColor(playerid, Clowns);
    }
    if (gTeam[playerid] == TEAM_HOBOS)
    {
        SetPlayerColor(playerid, Hobos);
    }
    if(gTeam[playerid] == TEAM_Army)
    {
        SetPlayerColor(playerid, Army);
    }
    if(gTeam[playerid] == TEAM_Cops)
    {
        SetPlayerColor(playerid, Cops);
    }
    return 1;
}
I just remembered when using "if" u cannot have any of these ";" after the statement.

pawn Код:
//under onplayerspawn put this
SetPlayerToTeamColour(playerid);
Thanks!

But now I got this instead:

Код:
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV.pwn(632) : error 017: undefined symbol "SetPlayerToTeamColour"
C:\Users\Davve\Desktop\Scripting\Server Las Venturas TDM\LV.pwn(859) : warning 203: symbol is never used: "SetPlayerToTeamColor"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Forum Jump:


Users browsing this thread: