SA-MP Forums Archive
5 Errors need fixing on my script - 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)
+--- Thread: 5 Errors need fixing on my script (/showthread.php?tid=451333)



5 Errors need fixing on my script - thomaswilliams - 16.07.2013

Ok well i compiled my script earlier when i changed something and i got these errors

C:\Users\Tonto\Desktop\Our Server\gamemodes\NLRP.pwn(6085) : error 001: expected token: "-identifier-", but found "["
C:\Users\Tonto\Desktop\Our Server\gamemodes\NLRP.pwn(6086) : error 029: invalid expression, assumed zero
C:\Users\Tonto\Desktop\Our Server\gamemodes\NLRP.pwn(6086) : error 035: argument type mismatch (argument 1)
C:\Users\Tonto\Desktop\Our Server\gamemodes\NLRP.pwn(6086) : error 020: invalid symbol name ""
C:\Users\Tonto\Desktop\Our Server\gamemodes\NLRP.pwn(6086) : fatal error 107: too many error messages on one line

this is the part of the script the errors are from

[pawn]ExecuteHackerAction( playerid, weaponid )
{
if(!gPlayerLogged{playerid}) { return 1; }
if(PlayerInfo[playerid][pTut] == 0) { return 1; }
if(playerTabbed[playerid] == 1) { return 1; }
if(GetPVarInt(playerid, "IsInArena") >= 0) { return 1; }

new String[128], WeaponName[128];
format(String, sizeof( String ), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) may possibly be weapon hacking (%s).", GetPlayerNameEx(playerid), playerid, WeaponName);
ABroadCast( COLOR_YELLOW, String, 2 );
format(String, sizeof(String), "%s (ID %d) may possibly be weapon hacking (%s)", GetPlayerNameEx(playerid), playerid, WeaponName);
Log("logs/hack.log", String);

return 1;
}[pawn]

Please help me


Re: 5 Errors need fixing on my script - BossZk - 16.07.2013

which one is line 6085?


Re: 5 Errors need fixing on my script - Dragonsaurus - 16.07.2013

pawn Код:
ExecuteHackerAction( playerid, weaponid )
{
      if(!gPlayerLogged(playerid)) return 1;
      if(PlayerInfo[playerid][pTut] == 0)  return 1;
      if(playerTabbed[playerid] == 1)  return 1;
      if(GetPVarInt(playerid, "IsInArena") >= 0) return 1;
      new String[128], WeaponName[128];
      format(String, sizeof(String), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) may possibly be weapon hacking (%s).", GetPlayerNameEx(playerid), playerid, WeaponName);
      ABroadCast(COLOR_YELLOW, String, 2);
      format(String, sizeof(String), "%s (ID %d) may possibly be weapon hacking (%s)", GetPlayerNameEx(playerid), playerid, WeaponName);
      Log("logs/hack.log", String);
      return 1;
}
And the last [ pawn ] should be [ /pawn ] (Without spaces)


Re: 5 Errors need fixing on my script - thomaswilliams - 16.07.2013

Still getting these

pawn Код:
C:\Users\Tonto\Desktop\Our Server\gamemodes\NLRP.pwn(6080) : error 012: invalid function call, not a valid address
C:\Users\Tonto\Desktop\Our Server\gamemodes\NLRP.pwn(6080) : warning 215: expression has no effect
C:\Users\Tonto\Desktop\Our Server\gamemodes\NLRP.pwn(6080) : error 001: expected token: ";", but found ")"
C:\Users\Tonto\Desktop\Our Server\gamemodes\NLRP.pwn(6080) : error 029: invalid expression, assumed zero
C:\Users\Tonto\Desktop\Our Server\gamemodes\NLRP.pwn(6080) : fatal error 107: too many error messages on one line



Re: 5 Errors need fixing on my script - JimmyCh - 16.07.2013

Did you do like this:
pawn Код:
forward ExecuteHackerAction(playerid, weaponid);
public ExecuteHackerAction( playerid, weaponid )
{
      if(!gPlayerLogged(playerid)) return 1;
      if(PlayerInfo[playerid][pTut] == 0)  return 1;
      if(playerTabbed[playerid] == 1)  return 1;
      if(GetPVarInt(playerid, "IsInArena") >= 0) return 1;
      new String[128], WeaponName[128];
      format(String, sizeof(String), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) may possibly be weapon hacking (%s).", GetPlayerNameEx(playerid), playerid, WeaponName);
      ABroadCast(COLOR_YELLOW, String, 2);
      format(String, sizeof(String), "%s (ID %d) may possibly be weapon hacking (%s)", GetPlayerNameEx(playerid), playerid, WeaponName);
      Log("logs/hack.log", String);
      return 1;
}