Where did those warnings come from?
#10

Quote:
Originally Posted by Montserrat
Посмотреть сообщение
Its not variables,its just the classid with is already defined
For example:
pawn Код:
if (classid == 1,2,3,4,5,6) { gTeam[playerid] = TEAM_X; }
Get it?
You can't do that in an if statement.

pawn Код:
switch(classid) {
   case 1, 2, 3, 4, 5, 6: { // or 1...6
      gTeam[playerid] = TEAM_X;
   }
}
If you still want to use an if statement for it, you'd have to do:

pawn Код:
if(1 <= classid <= 6) gTeam[playerid] = TEAM_X; // If this is the right operator
// or
if(classid == 1 || classid == 2 || classid == 3 || classid == 4 || classid == 5 || classid == 6) gTeam[playerid] = TEAM_X;
Reply


Messages In This Thread
Where did those warnings come from? - by nuriel8833 - 15.05.2011, 17:11
Re: Where did those warnings come from? - by cs_master - 15.05.2011, 17:18
Re: Where did those warnings come from? - by nuriel8833 - 15.05.2011, 17:28
Re: Where did those warnings come from? - by cs_master - 15.05.2011, 17:35
Re: Where did those warnings come from? - by Raimis_R - 15.05.2011, 17:35
Re: Where did those warnings come from? - by nuriel8833 - 15.05.2011, 17:39
Re: Where did those warnings come from? - by Raimis_R - 15.05.2011, 17:42
Re: Where did those warnings come from? - by nuriel8833 - 15.05.2011, 18:00
Respuesta: Where did those warnings come from? - by admantis - 15.05.2011, 18:01
Re: Where did those warnings come from? - by __ - 15.05.2011, 18:03

Forum Jump:


Users browsing this thread: 3 Guest(s)