bomb not work
#1

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.
Reply
#2

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;
}
Reply
#3

O.o

thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)