Compound statement not closing? Why?
#1

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.
Reply
#2

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
Reply
#3

THANK YOU!! I was just so focused on trying to fix the problem, I Over thought it and couldn't see that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)