SA-MP Forums Archive
[HELP]Error !! - 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: [HELP]Error !! (/showthread.php?tid=586818)



[HELP]Error !! - Andy5 - 25.08.2015

i was try to compiling something , and i got an error can someone help me to fix it

The Code :


PHP Code:
public Robbery(playerid)
{
   new 
string[256];
   new 
PlayerName[MAX_PLAYER_NAME];
   
GetPlayerName(playeridPlayerNamesizeof(PlayerName));
   {
        if(
Robbed[playerid] == 0);
        {
            if(
IsPlayerInRangeOfPoint(playerid5,2208.1985,-1072.3022,1050.4766))
            {
                     new 
Earning 500 random(500);
                    
format(stringsizeof(string), "%s Robbed %d from The Tatto Shop"Name(playerid), Earning);
                       
SendClientMessageToAll(COLOR_GREY,string);
                    
SendClientMessage(playeridCOLOR_RED"Rob Complete");
                      
GivePlayerMoney(playerid,Earning);
                      
Robbed[playerid] = 1;
                      
SetTimerEx("AbleRobbing"30000false"i"playerid);
                      
SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+1);
                      
SetPlayerScore(playerid,GetPlayerScore(playerid)+2);
                
            }
        }
            
    }
        

Error :

Code:
C:\Users\ma\Downloads\fp.pwn(367) : error 036: empty statement
Line (367) >>
Code:
        if(Robbed[playerid] == 0);



Re: [HELP]Error !! - Boot - 25.08.2015

Remove the brackets after GetPlayerName function.


Re: [HELP]Error !! - [KHK]Khalid - 25.08.2015

There's an extra semi-colon, remove it. It should be:

pawn Code:
if(Robbed[playerid] == 0)



Re: [HELP]Error !! - Andy5 - 25.08.2015

Quote:
Originally Posted by [KHK]Khalid
View Post
There's an extra semi-colon, remove it. It should be:

pawn Code:
if(Robbed[playerid] == 0)
works thanks