SA-MP Forums Archive
bomb not work - 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: bomb not work (/showthread.php?tid=545080)



bomb not work - ThunderX - 06.11.2014

pawn Код:
CMD:bomb(playerid,params[])
{
    if(c4[playerid] != 0)
    {
          for(new A; A < 11;A++)
          {
            if(c4x[A][playerid] != 9999 && c4y[A][playerid] != 9999 && c4z[A][playerid] != 9999)
            {
              CreateExplosion(c4x[A][playerid],c4y[A][playerid],c4z[A][playerid],7,30.0);
              DestroyDynamicObject(c4c[A][playerid]);
              c4x[A][playerid] = 9999;
              c4y[A][playerid] = 9999;
              c4z[A][playerid] = 9999;
            }
          }
          c4[playerid] = 0;
          }
    }
    return 1;
}
pawn Код:
C:\Users\PANNAWIT\Desktop\test file\plantc4.pwn(87) : error 010: invalid function or declaration
87 =
pawn Код:
return 1;
question how to fix i cant fine the way to fix and what part i did wrong.


Re: bomb not work - BroZeus - 06.11.2014

Use this
pawn Код:
CMD:bomb(playerid,params[])
{
    if(c4[playerid] != 0)
    {
          for(new A; A < 11;A++)
          {
            if(c4x[A][playerid] != 9999 && c4y[A][playerid] != 9999 && c4z[A][playerid] != 9999)
            {
              CreateExplosion(c4x[A][playerid],c4y[A][playerid],c4z[A][playerid],7,30.0);
              DestroyDynamicObject(c4c[A][playerid]);
              c4x[A][playerid] = 9999;
              c4y[A][playerid] = 9999;
              c4z[A][playerid] = 9999;
            }
          }
          c4[playerid] = 0;
          }
    //} <----------an extra closing bracket that was causing error....
    return 1;
}



Re: bomb not work - ThunderX - 06.11.2014

O.o

thank you