multiple ondialogresponse
#1

This error comes
Quote:

C:\Users\x3990.003\Desktop\samp server\filterscripts\music.pwn(60) : warning 217: loose indentation
C:\Users\x3990.003\Desktop\samp server\filterscripts\music.pwn(97) : error 030: compound statement not closed at the end of file (started at line 34)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

For this code

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_MUSICS)
    {
        if(response) // Okay
        {
            if(listitem == 0) // Stop music
            {
                StopAudioStreamForPlayer(playerid);
            }
            if(listitem == 1) // Hip hop/Rap
            {
                ShowPlayerDialog(playerid, DIALOG_MUSICS_HIPHOP, DIALOG_STYLE_LIST, "Hip hop/Rap -- By Sabrina and Nicholas", "Blackstreet - No diggity\nDr Dre - Still dre\nTupac - Life goes on\nTupac - Changes\nDr Dre - Kush\nXzibit - Get your walk on\nNas - New york state of mind", "Okay", "Cancel");
            }
            if(listitem == 2) // Pop
            {
                //
            }
            if(listitem == 3) // Electronic
            {
                //
            }
            if(listitem == 4) // Raggae
            {
                //
            }
            if(listitem == 5) // Rock/heavy metal
            {
                //
            }
   	if(dialogid == DIALOG_MUSICS_HIPHOP)
   	{
   		if(response) // Okay
    	{
            if(listitem == 0) // No diggity
            {
                //
            }
            if(listitem == 1) // Still dre
            {
                //
            }
            if(listitem == 2) // Life goes on
            {
                //
            }
            if(listitem == 3) // Changes
            {
                //
            }
            if(listitem == 4) // Kush
            {
                //
            }
            if(listitem == 5) // Get your walk on
            {
                //
            }
            if(listitem == 6) // NY state of mind
            {
                //
            }
    	}
        return 1;
   	}
    return 0;
}
Reply
#2

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_MUSICS)
    {
        if(response) // Okay
        {
            if(listitem == 0) // Stop music
            {
                StopAudioStreamForPlayer(playerid);
            }
            if(listitem == 1) // Hip hop/Rap
            {
                ShowPlayerDialog(playerid, DIALOG_MUSICS_HIPHOP, DIALOG_STYLE_LIST, "Hip hop/Rap -- By Sabrina and Nicholas", "Blackstreet - No diggity\nDr Dre - Still dre\nTupac - Life goes on\nTupac - Changes\nDr Dre - Kush\nXzibit - Get your walk on\nNas - New york state of mind", "Okay", "Cancel");
            }
            if(listitem == 2) // Pop
            {
                //
            }
            if(listitem == 3) // Electronic
            {
                //
            }
            if(listitem == 4) // Raggae
            {
                //
            }
            if(listitem == 5) // Rock/heavy metal
            {
                //
            }
        }
    }
    if(dialogid == DIALOG_MUSICS_HIPHOP)
    {
        if(response) // Okay
        {
            if(listitem == 0) // No diggity
            {
                //
            }
            if(listitem == 1) // Still dre
            {
                //
            }
            if(listitem == 2) // Life goes on
            {
                //
            }
            if(listitem == 3) // Changes
            {
                //
            }
            if(listitem == 4) // Kush
            {
                //
            }
            if(listitem == 5) // Get your walk on
            {
                //
            }
            if(listitem == 6) // NY state of mind
            {
                //
            }
        }
    }
    return 1;
}
Reply
#3

Post your code here,

http://codegenerators.pl/brackets

It helps to understand where you got missing brackets.
Reply
#4

Quote:
Originally Posted by pawncc
C:\Users\x3990.003\Desktop\samp server\filterscripts\music.pwn(97) : error 030: compound statement not closed at the end of file (started at line 34)
This also shows you where you are missing brackets @ Tamer_T
Reply
#5

We all know that,but it counts it,its simplific or nobody would use it,eh?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)