SA-MP Forums Archive
Dialog problem[REP+] - 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: Dialog problem[REP+] (/showthread.php?tid=371039)



Dialog problem[REP+] - Strech - 22.08.2012

After i added a dialog,thats the errors i receive
pawn Код:
C:\Documents and Settings\Dimitar\Desktop\ESRP ne e promenen\ESRP ne e promenen\DSRP\DSRP\gamemodes\NDRP.pwn(75681) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Dimitar\Desktop\ESRP ne e promenen\ESRP ne e promenen\DSRP\DSRP\gamemodes\NDRP.pwn(75681) : warning 215: expression has no effect
C:\Documents and Settings\Dimitar\Desktop\ESRP ne e promenen\ESRP ne e promenen\DSRP\DSRP\gamemodes\NDRP.pwn(75681) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Dimitar\Desktop\ESRP ne e promenen\ESRP ne e promenen\DSRP\DSRP\gamemodes\NDRP.pwn(75681) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Dimitar\Desktop\ESRP ne e promenen\ESRP ne e promenen\DSRP\DSRP\gamemodes\NDRP.pwn(75681) : fatal error 107: too many error messages on one line
The line is this:
pawn Код:
if(dialogid == BUYTOYS) && response)



Re: Dialog problem[REP+] - ThePhenix - 22.08.2012

Post the full lines of your DIALOG!


Re: Dialog problem[REP+] - newbienoob - 22.08.2012

Remove ")" after BUYTOYS


Re: Dialog problem[REP+] - ThePhenix - 22.08.2012

I made a DIALOG you can check out here.
And look what's wrong on your dialog.

pawn Код:
#define DIALOG_BUYTOYS   23786

ShowPlayerDialog(playerid, DIALOG_BUYTOYS, DIALOG_STYLE_LIST, "BUYTOYS", "Toy1\nToy2\nToy3\nToy4\nToy5", "Buy", "Cancel");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_BUYTOYS){
        if(response){
            switch(listitem)){
                case 0:
                {
                    //Selected Item: "Toy1"
                }
                case 1:
                {
                    //Selected Item: "Toy2"
                }
                case 2:
                {
                    //Selected Item: "Toy3"
                }
                case 3:
                {
                    //Selected Item: "Toy4"
                }
                case 4:
                {
                    //Selected Item: "Toy5"
                }
            }
        }
        else{
            //The player has pressed "Buy".
            switch(listitem{
                case 0:
                {
                    //Selected Item: "Toy1"
                }
                case 1:
                {
                    //Selected Item: "Toy2"
                }
                case 2:
                {
                    //Selected Item: "Toy3"
                }
                case 3:
                {
                    //Selected Item: "Toy4"
                }
                case 4:
                {
                    //Selected Item: "Toy5"
                }
            }
        }
    }
    return 0;
}



Re: Dialog problem[REP+] - HuSs3n - 22.08.2012

pawn Код:
if(dialogid == BUYTOYS && response == 1)