SA-MP Forums Archive
How to fix thes errors? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to fix thes errors? (/showthread.php?tid=73021)



How to fix thes errors? - krisis32 - 12.04.2009

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;
}



Re: How to fix thes errors? - Sir_Brock - 12.04.2009

I presume the line is...

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

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




Re: How to fix thes errors? - krisis32 - 12.04.2009

alredy did it.. same error!


Re: How to fix thes errors? - krisis32 - 12.04.2009

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;
}



Re: How to fix thes errors? - Weirdosport - 12.04.2009

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


Re: How to fix thes errors? - Google63 - 12.04.2009

you didn't put switch above cases


Re: How to fix thes errors? - AiVAMAN - 12.04.2009

which line is 482?


Re: How to fix thes errors? - krisis32 - 12.04.2009

case 14,15,16;


Re: How to fix thes errors? - AiVAMAN - 12.04.2009

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.


Re: How to fix thes errors? - krisis32 - 12.04.2009

Код:
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.