DIALOGS, weird error!!
#1

pawn Код:
new listitems[] = "1\tDesert Eagle\n2\tGrenades\n3\tSawn-Off Shotgun\n4\tMolotov\n5\tRPG-7\n6\tAK47\n7\tM4\n";
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 2) {
        if(response) {
            new message[256+1];
            if(listitem == 0) {
                BLABLA
            } else if(listitem == 1) {
                BLABLA
      } else if(listitem == 2) {
                BLABLA
      } else if(listitem == 3) {
                BLABLA
      } else if(listitem == 4) {
                BLABLA
      } else if(listitem == 5) {
                BLABLA
      } else if(listitem == 6) {
                BLABLA
                return 1;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/hehe", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"List of weapons:",listitems,"Get Gun","Cancel");
        return 1;
    }
    return 0;
}
error is:
Код:
error 030: compound statement not closed at the end of file (started at line 227)
LINE 227:
pawn Код:
new message[256+1];
Reply
#2

Sorry bumping this but i really need help!
Reply
#3

These aren't being closed

pawn Код:
if(dialogid == 2) {
if(response) {
That means you're missing a closing brace.
Reply
#4

well, yea but i cant seem to find where
Reply
#5

*sigh*

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 2) {
if(response) {
new message[256+1];
if(listitem == 0) {
BLABLA
} else if(listitem == 1) {
BLABLA
      } else if(listitem == 2) {
BLABLA
      } else if(listitem == 3) {
BLABLA
      } else if(listitem == 4) {
BLABLA
      } else if(listitem == 5) {
BLABLA
      } else if(listitem == 6) {
BLABLA
} //end of if(listitem == 6)
} //end of if(response)
} //end of if(dialog == 2)
return 1;
}
Add those braces where it shows my comments.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)