error 030: compound statement not closed at the end of file
#1

Hello everybody,
I have a problem with my compilator because return me this error
Код:
(363) : error 030: compound statement not closed at the end of file (started at line 325)
this is line 325
Код:
if(response)
Full code
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_CARPENTIERE)
	{
		if(response) //this is the error line
		{
		    if((Carpentiere[playerid] == 0))
		    {
			ShowInfoForPlayer(playerid,"Hai accettato il lavoro.", 3000);
			Carpentiere[playerid] = 1;
			new x = random (2);
			if(x == 0)
			{
            SetPlayerCheckpoint(playerid, 1280.0118, -1262.7102, 13.5107, 2.0);
		    }
		    if(x == 1)
			{
            SetPlayerCheckpoint(playerid,1280.9083, -1242.0677, 13.9160, 2.0);
			}
			if(x == 2 || x ==3)
			{
            SetPlayerCheckpoint(playerid,1268.9485, -1234.4961, 17.0519, 2.0);
			}
			CP[playerid] = 1;
        }
		else
		{
            if((Carpentiere[playerid] == 1))
            {
			ShowInfoForPlayer(playerid,"Hai annullato il lavoro.", 3000);
			Carpentiere[playerid] = 0;
			DisablePlayerCheckpoint(playerid);
			ClearAnimations(playerid);
			SetPlayerSpecialAction(playerid,0);
			CP[playerid] = 0;
			}
			}
	        return 1;
}
//Finish gamemode
How to fix?
I hope can somebody help me..
Reply
#2

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_CARPENTIERE)
    {
        if(
response//this is the error line
        
{
            if((
Carpentiere[playerid] == 0))
            {
            
ShowInfoForPlayer(playerid,"Hai accettato il lavoro."3000);
            
Carpentiere[playerid] = 1;
            new 
random (2);
            if(
== 0)
            {
            
SetPlayerCheckpoint(playerid1280.0118, -1262.710213.51072.0);
            }
            if(
== 1)
            {
            
SetPlayerCheckpoint(playerid,1280.9083, -1242.067713.91602.0);
            }
            if(
== || ==3)
            {
            
SetPlayerCheckpoint(playerid,1268.9485, -1234.496117.05192.0);
            }
            
CP[playerid] = 1;
        }
        else
        {
            if((
Carpentiere[playerid] == 1))
            {
            
ShowInfoForPlayer(playerid,"Hai annullato il lavoro."3000);
            
Carpentiere[playerid] = 0;
            
DisablePlayerCheckpoint(playerid);
            
ClearAnimations(playerid);
            
SetPlayerSpecialAction(playerid,0);
            
CP[playerid] = 0;
            }
            }
                        }
                        }
            return 
1;

your code were missing } if my code showed the same error try to add / remove more }
Reply
#3

bracket
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[]){
    if(
dialogid == DIALOG_CARPENTIERE){
        if(
response){
            if((
Carpentiere[playerid] == 0)){
                
ShowInfoForPlayer(playerid,"Hai accettato il lavoro."3000);
                
Carpentiere[playerid] = 1;
                new 
random (2);
                if(
== 0){
                    
SetPlayerCheckpoint(playerid1280.0118, -1262.710213.51072.0);
                } else if(
== 1){
                    
SetPlayerCheckpoint(playerid,1280.9083, -1242.067713.91602.0);
                } else if(
== || ==3){
                    
SetPlayerCheckpoint(playerid,1268.9485, -1234.496117.05192.0);
                }
                
CP[playerid] = 1;
            } else {
                if((
Carpentiere[playerid] == 1)){
                    
ShowInfoForPlayer(playerid,"Hai annullato il lavoro."3000);
                    
Carpentiere[playerid] = 0;
                    
DisablePlayerCheckpoint(playerid);
                    
ClearAnimations(playerid);
                    
SetPlayerSpecialAction(playerid,0);
                    
CP[playerid] = 0;
                }
            }
        }
    }
    return 
1;
}
//Finish gamemode 
Your code is unreadable.
Reply
#4

Start indenting your code right and this would've been obvious. If you can't do proper indentation either give up on scripting or learn how to do it right.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)