SetPlayerTeamToColor
#1

I got this:

Код:
 * * * SetPlayerToTeamColor(playerid)
  * {
  * * * * * if (gTeam[playerid] == TEAM_HOMELESS)
  * * * * * {
  * * * * * * * * * SetPlayerColor(playerid, TEAM_HOMELESS_COLOR);
  * * * * * }
  * * * * * else if (gTeam[playerid] == TEAM_HOMELESS_2
  * * * * * {
  *                 SetPlayerColor(playerid, TEAM_HOMELESS_2_COLOR);
  *          }
  * }
  *
Im getting this error msg:

[CODE] (44): unknown directive
(347): undefined symbol "gTeam"
(347): expression has no effect
(347): expected token: ";", but found "]"
(347): invalid expression, assumed zero
Fatal: too many errorr msg on a line.[CODE]

Line 44 says:#new gTeam[MAX_PLAYERS]
Reply
#2

you forgot to put ; at the end
try this
pawn Код:
gTeam[MAX_PLAYERS];

  SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_HOMELESS)
    {
    SetPlayerColor(playerid, TEAM_HOMELESS_COLOR);
    }
    else if (gTeam[playerid] == TEAM_HOMELESS_2)
    {
    SetPlayerColor(playerid, TEAM_HOMELESS_2_COLOR);
    }
}
Reply
#3

PHP код:
else if (gTeam[playerid] == TEAM_HOMELESS_2)//Missing ) 
Reply
#4

Quote:
Originally Posted by ThePhenix
Посмотреть сообщение
PHP код:
else if (gTeam[playerid] == TEAM_HOMELESS_2)//Missing ) 
I missed it on while typing cauz was on phone. + line 347 is this:

if(gTeam[playerid] == TEAM_HOMELESS)
Reply
#5

Can I see this line? (44): unknown directive
So line 44.
Reply
#6

It must fix then:

new gTeam[MAX_PLAYERS];
Reply
#7

no, it doesn'ts :S
Reply
#8

without # just new gTeam[MAX_PLAYERS];

SetPlayerToTeamColor + question did you forward it?
Reply
#9

np, i didn't forward, what how do i do?
Reply
#10

NOW IT says:

[CODE]C:\Users\user7\Desktop\Server\gamemodes\new.pwn(63 ) : error 001: expected token: ";", but found "-identifier-"
C:\Users\user7\Desktop\Server\gamemodes\new.pwn(47 3) : warning 203: symbol is never used: "SetPlayerTeamFromClass"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
[CODE]

Line 63 says main()
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)