SA-MP Forums Archive
if statement problem-Empty statement - 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: if statement problem-Empty statement (/showthread.php?tid=424670)



if statement problem-Empty statement - Tamer - 23.03.2013

pawn Код:
{
    if (PRESSED(KEY_WALK))
    {
     if(IsPlayerInRangeOfPoint(playerid,2,212.6805,1824.3676,6.4141))
     {
      if(GetPlayerTeam(playerid) == 2); //9231
      {
     SendClientMessage(playerid,RED,"Bomb planted!");
     CreateObject(1654, 212.04, 1824.32, 6.77,   -40.00, -91.00, 90.00);
     SetTimerEx("BombExp", 5000, false, "i", playerid);
      }
      if(GetPlayerTeam(playerid) == 1); //9237
      {
          //defuse
         }
     }
     if(IsPlayerInRangeOfPoint(playerid,2,234.3680,1822.7998,7.4141))
     {
     if(GetPlayerTeam(playerid) == 1) return 0;
     CreateObject(1654, 233.73, 1822.88, 7.46,   0.00, 33.00, 92.00);
     SetTimerEx("Dynamitez", 5000, false, "i", playerid);
     SendClientMessage(playerid,RED,"You have planted a dynamite! It will explode in 5 seconds!");
     }
    }
    return 1;
}
(9231) : error 036: empty statement
(9237) : error 036: empty statement
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


Re: if statement problem-Empty statement - InfiniTy. - 23.03.2013

You don't need ; after an if statement


Re: if statement problem-Empty statement - Tamer - 23.03.2013

Thanks man. I knew this aldready but I forgot it at this point -.- Repped.