Compound statement not closing? Why? - 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: Compound statement not closing? Why? (
/showthread.php?tid=533742)
Compound statement not closing? Why? -
Th3UnKnOwN - 26.08.2014
C:\Users\PhantoM21\Desktop\Test.pwn(54) : warning 217: loose indentation
C:\Users\PhantoM21\Desktop\Test.pwn(56) : error 030: compound statement not closed at the end of file (started at line 33)
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
//SendClientMessage(playerid,0x008000FF, "Enjoy your stay!");
}
else
{
//SendClientMessage(playerid, 0xFF0000FF, "You selected 'Quit', therefore you got kicked. Goodbye!");
//Kick(playerid);
}
if(dialogid == 2)
{
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid,0xFF0000FF,"Test");
}
}
}
return 0;
}
if(dialogid == 1) Is line 33.
Return 0; Is line 54.
and the last } is line 56.
Re: Compound statement not closing? Why? -
jessejanssen - 26.08.2014
If you count the opening
( { ) and closing
( } ) brackets you'll see that you have 7 opening
( { ) brackets in the code and just 6 closing
( } ) brackets, should be enough said, if you're still unable to fix the problem just ask for help again.
Best regards,
Jesse
Re: Compound statement not closing? Why? -
Th3UnKnOwN - 26.08.2014
THANK YOU!! I was just so focused on trying to fix the problem, I Over thought it and couldn't see that.