SA-MP Forums Archive
Blank Button. - 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: Blank Button. (/showthread.php?tid=290321)



Blank Button. - TomTroX - 15.10.2011

Hello. I have to report this BUG.

When the dialogue is too much character and it is empty the button shows up as "".



pawn Код:
CMD:topgangs(playerid, params[])
{
    new
        id,
        resp[8],
        nazwa[32],
        DBResult:result,
        dialog[3000] = " ** Lista gangуw: **\n"
    ;

    result = db_query(Global, "SELECT `name`, `respect` FROM `Gangi` ORDER BY `respect` DESC LIMIT 40");

    do
    {
        id++;
        db_get_field(result, 0, nazwa, sizeof(nazwa));
        db_get_field(result, 1, resp, sizeof(resp));
        format(dialog, sizeof dialog, "%s\n\t{FFFF00}%d. %s\t\t\t{FAEAA9}p. %s", dialog, id, nazwa, resp);
    }
    while(db_next_row(result));

    format(dialog, sizeof dialog, "%s\n___________________________________", dialog);
    ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, "Top Gangуw", dialog, "", "Zamknij");

    db_free_result(result);
    return 1;
}
It is suggested to fix it in version 0.3d
This is done intentionally or something wrong in my code?
Does anyone understand what I mean?


Re: Blank Button. - Emmet_ - 15.10.2011

Lol...

Код:
ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, "Top Gangуw", dialog, "", "Zamknij");
Do you notice the "" I've just highlighted in Red? That's your reason.


Re: Blank Button. - leong124 - 15.10.2011

The first button mustn't be null. If you want to use single button you must put that button as the first button, instead of the second one.


Re: Blank Button. - TomTroX - 15.10.2011

Ok, thanks..
To close.