SA-MP Forums Archive
compound statement not closed at the end of file? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: compound statement not closed at the end of file? (/showthread.php?tid=98852)



compound statement not closed at the end of file? - spiper - 23.09.2009

C:\Documents and Settings\Steven\Desktop\Cowboysahouse.pwn(175) : error 030: compound statement not closed at the end of file (started at line 159)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

http://pastebin.com/m52c8b86c
theres the part, starts at line 159 and goes to 172


Re: compound statement not closed at the end of file? - member - 23.09.2009

you are missing a brace at the end on line 175. Opening braces does not match closing braces.


Re: compound statement not closed at the end of file? - spiper - 23.09.2009

Hmm, The last line in the pawno is at 174

174 #endif


Re: compound statement not closed at the end of file? - Donny_k - 23.09.2009

Read what it is saying correctly dude:

Quote:

not closed at the end of file (started at line 159)

It's saying it was opened at 159 and by the end of the file (line 175) it has not been closed.


Re: compound statement not closed at the end of file? - spiper - 23.09.2009

Quote:
Originally Posted by Donny
Read what it is saying correctly dude:

Quote:

not closed at the end of file (started at line 159)

It's saying it was opened at 159 and by the end of the file (line 175) it has not been closed.
Exactly why i posted, I dont know whats wrong with it....


Re: compound statement not closed at the end of file? - Donny_k - 23.09.2009

Yes I know dude but I don't know what is on those lines, you would have to post lines 150 to 175.


Re: compound statement not closed at the end of file? - spiper - 23.09.2009

http://pastebin.com/m155a18d4
lines 143 173, the script is done at 173 there is nothing under it.


Re: compound statement not closed at the end of file? - member - 23.09.2009

As was stated, the number of opening braces does not equal to the number of closing braces. You had one or two missing. You would have realised this if you properly indented and would've saved u time.

Anyways here it is:

pawn Код:
if(!strcmp(cmdtext,"/agate",true))
    {
        if(IsPlayerAdmin(playerid))
        {
            MoveObject(MG3,2923.7536621094, -716.33807373047, 2.148454666138,2);
            MoveObject(MG4,2923.6889648438, -724.21716308594, 2.148454666138,2);
            SetTimer("aGate1", 5000, 0);
            SendClientMessage(playerid, COLOR_WHITE, "Welcome");
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "Your not an admin");
            return 1;
        }
    }
    if(!strcmp(cmdtext,"/agate2",true))
    {
        if(IsPlayerAdmin(playerid))
        {
            MoveObject(MG,3157.6267089844, -716.3544921875, 2.148454666138,2);
            MoveObject(MG2,3157.6516113281, -724.22485351563, 2.148454666138,2);
            SetTimer("aGate2", 5000, 0);
            SendClientMessage(playerid, COLOR_WHITE, "Welcome to the admin house.");
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "Your not an admin.");
            return 1;
        }
    }
    return 0; // remove this line and the next line if this is not the end of OnPlayerCommandText.
 }



Re: compound statement not closed at the end of file? - Donny_k - 23.09.2009

What he said ^^.

PS. I use notepadd++ to script then compile in Pawno, it highlights your scopes so it can be really helpfull, maybe you could give it a try and see what you think.


Re: compound statement not closed at the end of file? - spiper - 23.09.2009

Yeah now im getting a shit load of errors, ill just wait till one of my other scripters gets on and send it to him to fix it, thanks for all the help