SA-MP Forums Archive
error 012: invalid function call, not a valid address - 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: error 012: invalid function call, not a valid address (/showthread.php?tid=428733)



error 012: invalid function call, not a valid address - Pointer - 06.04.2013

i tried to make /roadblock package for cops but when i compile
Код:
(18303) : error 012: invalid function call, not a valid address
(18303) : warning 215: expression has no effect
(18303) : warning 215: expression has no effect
(18303) : warning 215: expression has no effect
(18303) : warning 215: expression has no effect
(18303) : warning 215: expression has no effect
(18303) : error 001: expected token: ";", but found ")"
(18303) : error 029: invalid expression, assumed zero
(18303) : fatal error 107: too many error messages on one line
here are the scripts

pawno code
pawn Код:
CMD:roadblock(playerid, params[])
return cmd_rb(playerid, params);
CMD:rb(playerid, params[])
    {
       new CreateRoadblock;
       new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
       new rb = strval(params);
       new sendername[ MAX_PLAYER_NAME ];
       new string[250];
       if(GetTeam{playerid} == CLASS_COPS || GetTeam{playerid} == CLASS_SWAT || GetTeam{playerid} == CLASS_FBI)
       {
          if (isnull(params))
          {
             SendClientMessage(playerid, RED, "USAGE: /rb [Roadblock ID]");
             SendClientMessage(playerid, LIGHTBLUE, "Available Roadblocks:");
             SendClientMessage(playerid, WHITE, "| 1: Small Roadblock | 2: Medium Roadblock |");
             SendClientMessage(playerid, WHITE, "| 3: Big Roadblock | 4: Cone | 5: Detour Sign |");
             SendClientMessage(playerid, WHITE, "| 6: Will Be Sign | 7: Line Closed Sign |");
             return 1;
          }
          if (rb == 1)
          {
             PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
             GetPlayerPos(playerid, plocx, plocy, plocz);
             CreateRoadblock(1459,plocx,plocy,plocz,ploca);//line 18303
             GetPlayerFacingAngle(playerid,ploca);
             format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(1) at his position, over.",sendername);
             CopRadio(BLUE, fstr);
             GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
             return 1;