SA-MP Forums Archive
Dialog help please? - 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 help please? (/showthread.php?tid=391333)



Dialog help please? - Tass007 - 10.11.2012

Hi, i have created this dialog i am currently learning Dialog and this warning gave me but i don't have a clue in how to fix it here is my dialog and my OnDialogResponse

pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Welcome to Profound Gaming's Paradise Island!\n To insure you have a nice time you need to accept some rules first\nHacking or Cheating = BAN\nAbusing bugs / glitches = BAN\nDo not ask admins for vehicles.\nNever ask for admin or promotion.\nYou are allowed to have 1 car of 1 model\nSpawnkilling or any other unfair killing is not allowed.\nShow respect to all admins and players\n For more rules type /rules","Agree","DisAgree");
Here is my OnDialogResponse
pawn Код:
if(dialogid == 1)
    {
        new stringg[599];
        if(response == 1)
        {
                switch(listitem)
                {
                    case 0:
                    {

                    }
                    case 1:
                    {
                    Kick(playerid);
                    SendClientMessage(playerid,green,"You DisAgreed to the rules so you therfore got kicked. Goodbye!");
                    new nome[24];
                    GetPlayerName(playerid, nome, 24);
                    format(stringg, sizeof(stringg), "** {FFFFFF}%s{00BFFF} has been kicked from the Server. [Reason: {FFFFFF}Disagreed to the rules{00BFFF}]", nome);
                    }


                }

        }
    }
And Here is my Warning
Код:
 warning 202: number of arguments does not match definition
The Warning is on the line of the dialog itself.

Thanks


Re: Dialog help please? - JaKe Elite - 10.11.2012

pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST, "Welcome!", "Welcome to Profound Gaming's Paradise Island!\n To insure you have a nice time you need to accept some rules first\nHacking or Cheating = BAN\nAbusing bugs / glitches = BAN\nDo not ask admins for vehicles.\nNever ask for admin or promotion.\nYou are allowed to have 1 car of 1 model\nSpawnkilling or any other unfair killing is not allowed.\nShow respect to all admins and players\n For more rules type /rules","Agree","DisAgree");
Recommend you to use strcat, This code will give error because the line is too long..


Re: Dialog help please? - Mmartin - 10.11.2012

You're missing a caption.
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])


Re: Dialog help please? - Tass007 - 10.11.2012

Oh right i totaly forgot about that thanks. +rep to MMartin