How to fix thes errors?
#1

How to fix this errors and warnings?

Код:
E:\sa-mp servers\gamemodes\wwrrp.pwn(605) : error 029: invalid expression, assumed zero
E:\sa-mp servers\gamemodes\wwrrp.pwn(605) : error 029: invalid expression, assumed zero
E:\sa-mp servers\gamemodes\wwrrp.pwn(605) : warning 215: expression has no effect
E:\sa-mp servers\gamemodes\wwrrp.pwn(605) : error 029: invalid expression, assumed zero
E:\sa-mp servers\gamemodes\wwrrp.pwn(605) : fatal error 107: too many error messages on one line

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


4 Errors.
Line 605
pawn Код:
if(!TEAM_COP[playerid;)

pawn Код:
if( !strcmp(cmdtext, "/mp", true, 3) ) // 3 is the length of /me
{

    new str[256], pname[256];
    GetPlayerName(playerid, pname, 256);
    format(str, 256, "(Officer %s: %s )", pname, cmdtext[4]);
    SendClientMessageToAll(COLOR_BLUE, str);
  if(!TEAM_COP[playerid;)
  return SendClientMessage(playerid,COLOR_RED,"!!You aren't a cop!!");
}

here are some more errors:

Код:
E:\sa-mp servers\gamemodes\wwrrp.pwn(482) : error 014: invalid statement; not in switch
E:\sa-mp servers\gamemodes\wwrrp.pwn(482) : warning 215: expression has no effect
E:\sa-mp servers\gamemodes\wwrrp.pwn(482) : warning 215: expression has no effect
E:\sa-mp servers\gamemodes\wwrrp.pwn(482) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
  case 14,15,16;
    {
  //SetPlayerTeamFromClass(playerid, classid);
  GameTextForPlayer(playerid, "~b~POLICE OFFICER~n~~w~CITY OFFICER", 3000, 5);
  SetPlayerInterior(playerid, 3);
  SetPlayerFacingAngle(playerid, 278.0276);
  SetPlayerPos(playerid, 230.5686,165.0502,1003.0234);
  SetPlayerCameraPos( playerid, 233.1806, 163.3041, 1003.6234 );
  SetPlayerCameraLookAt( playerid, 225.1943, 169.3222, 1003.6234 );
  ApplyAnimation(playerid,"POLICE","CopTraf_Stop",4.1,0,1,1,1,1);
    }

  return 1;
}
Reply
#2

I presume the line is...

Код:
if(!TEAM_COP[playerid;)
..change it to..

Код:
if(!TEAM_COP[playerid])

Reply
#3

alredy did it.. same error!
Reply
#4

here are some more errors:

Код:
E:\sa-mp servers\gamemodes\wwrrp.pwn(482) : error 014: invalid statement; not in switch
E:\sa-mp servers\gamemodes\wwrrp.pwn(482) : warning 215: expression has no effect
E:\sa-mp servers\gamemodes\wwrrp.pwn(482) : warning 215: expression has no effect
E:\sa-mp servers\gamemodes\wwrrp.pwn(482) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
  case 14,15,16;
    {
  //SetPlayerTeamFromClass(playerid, classid);
  GameTextForPlayer(playerid, "~b~POLICE OFFICER~n~~w~CITY OFFICER", 3000, 5);
  SetPlayerInterior(playerid, 3);
  SetPlayerFacingAngle(playerid, 278.0276);
  SetPlayerPos(playerid, 230.5686,165.0502,1003.0234);
  SetPlayerCameraPos( playerid, 233.1806, 163.3041, 1003.6234 );
  SetPlayerCameraLookAt( playerid, 225.1943, 169.3222, 1003.6234 );
  ApplyAnimation(playerid,"POLICE","CopTraf_Stop",4.1,0,1,1,1,1);
    }

  return 1;
}
Reply
#5

Could you point out which lines are 482 and 605, so I know where to look
Reply
#6

you didn't put switch above cases
Reply
#7

which line is 482?
Reply
#8

case 14,15,16;
Reply
#9

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
  switch (classid)
  {
    case 14 || 15 || 16:
    {
      //SetPlayerTeamFromClass(playerid, classid);
      SetPlayerInterior(playerid, 3);
      SetPlayerFacingAngle(playerid, 278.0276);
      SetPlayerPos(playerid, 230.5686,165.0502,1003.0234);
      SetPlayerCameraPos( playerid, 233.1806, 163.3041, 1003.6234 );
      SetPlayerCameraLookAt( playerid, 225.1943, 169.3222, 1003.6234 );
      ApplyAnimation(playerid,"POLICE","CopTraf_Stop",4.1,0,1,1,1,1);
      GameTextForPlayer(playerid, "~b~POLICE OFFICER~n~~w~CITY OFFICER", 3000, 5);
      return 1;
      }
    }
  return 1;
}

I think it sould be like this.
Reply
#10

Код:
E:\sa-mp servers\gamemodes\wwrrp.pwn(492) : error 002: only a single statement (or expression) can follow each "case"
E:\sa-mp servers\gamemodes\wwrrp.pwn(492) : warning 215: expression has no effect
E:\sa-mp servers\gamemodes\wwrrp.pwn(493) : warning 209: function "OnPlayerRequestClass" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)