Making team and colors errors
#1

pawn Код:
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(171 -- 172) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(173) : error 017: undefined symbol "TEAM_GROVE"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(176 -- 177) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(178) : error 017: undefined symbol "TEAM_BALLAS"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(181 -- 182) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(183) : error 017: undefined symbol "TEAM_VAGOS"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(183) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(184 -- 185) : error 001: expected token: ",", but found "}"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(186 -- 187) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(188) : error 017: undefined symbol "TEAM_AZTECAS"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(192) : warning 217: loose indentation
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


10 Errors.
Код:
public OnPlayerSpawn(playerid)
{
  switch(GetPlayerSkin(playerid))
	 {
		 case 105 .. 107
		 {
			  SetPlayerTeam(playerid, TEAM_GROVE);
			  SetPlayerColor(playerid, COL_GREEN);
			  }
			  case 102 .. 104
			  {
				  SetPlayerTeam(playerid, TEAM_BALLAS);
				  SetPlayerColor(playerid, COL_PURPLE);
			  }
			  case 108 .. 110
			  {
				  SetPlayerTeam(playerid, TEAM_VAGOS):
				  SetPlayerColor(playerid, COL_YELLOW
			  }
			  case 114 .. 116
			  {
				  SetPlayerTeam(playerid, TEAM_AZTECAS);
				  SetPlayerColor(playerid, COL_LIGHTBLUE);
			  }
	  }
	  return 1;
}
Reply
#2

pawn Код:
#define TEAM_GROVE 1
#define TEAM_BALLAS 2
#define TEAM_VAGOS 3
#define TEAM_AZTECAS 4
Put they top script under <a_samp>
Reply
#3

Same...
Reply
#4

Now i got dis
Код:
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(179 -- 180) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(184 -- 185) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(189 -- 190) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(191) : error 001: expected token: ";", but found ":"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(191) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(194 -- 195) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\CpsNrbrs.pwn(200) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#5

Код:
public OnPlayerSpawn(playerid)
{
	switch(GetPlayerSkin(playerid))
	{
		 case 105 .. 107:
		 {
	  		SetPlayerTeam(playerid, TEAM_GROVE);
			SetPlayerColor(playerid, COL_GREEN);
		 }
		 case 102 .. 104:
		 {
	  		SetPlayerTeam(playerid, TEAM_BALLAS);
	  		SetPlayerColor(playerid, COL_PURPLE);
		 }
		 case 108 .. 110:
		 {
	  		SetPlayerTeam(playerid, TEAM_VAGOS);
	  		SetPlayerColor(playerid, COL_YELLOW);
		 }
		 case 114 .. 116:
		 {
	  		SetPlayerTeam(playerid, TEAM_AZTECAS);
	  		SetPlayerColor(playerid, COL_LIGHTBLUE);
		}
	}
    return 1;
}
Reply
#6

Thank you very much what was the prob ? :P
Reply
#7

There were several issues.
Код:
SetPlayerColor(playerid, COL_YELLOW
At the end of the function you didn't close it off.
Код:
case 105 .. 107
At the end of these they require a colon.
Код:
SetPlayerTeam(playerid, TEAM_VAGOS):
You had typed a colon instead of a semicolon.
Reply
#8

pawn Код:
#define COL_GREEN 0x04FF00FF
#define COL_PURPLE 0x470054FF
#define COL_YELLOW 0xFAFF00FF
#define COL_LIGHTBLUE 0x3399FFAA

#define TEAM_GROVE 1
#define TEAM_BALLAS 2
#define TEAM_VAGOS 3
#define TEAM_AZTECAS 4

public OnPlayerSpawn(playerid)
{
    new skin = GetPlayerSkin(playerid);
    switch(skin)
    {
        case 105 .. 107:
        {
            SetPlayerTeam(playerid, TEAM_GROVE);
            SetPlayerColor(playerid, COL_GREEN);
        }
        case 102 .. 104:
        {
            SetPlayerTeam(playerid, TEAM_BALLAS);
            SetPlayerColor(playerid, COL_PURPLE);
        }
        case 108 .. 110:
        {
            SetPlayerTeam(playerid, TEAM_VAGOS);
            SetPlayerColor(playerid, COL_YELLOW);
        }
        case 114 .. 116:
        {
            SetPlayerTeam(playerid, TEAM_AZTECAS);
            SetPlayerColor(playerid, COL_LIGHTBLUE);
        }
    }
    return 1;
}
Edit: Oops, nvm, didn't see the other guy's above post, because I was in the writing a comment screen
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)