SA-MP Forums Archive
DIALOG_STYLE_TABLIST_HEADERS and sscanf - 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_STYLE_TABLIST_HEADERS and sscanf (/showthread.php?tid=593935)



DIALOG_STYLE_TABLIST_HEADERS and sscanf - Mielnicky - 11.11.2015

Hello. I have a problem with new dialog in version 0.3.7, with sscanf function, where it wants get two parameters entered in the field. This problem only occurs in new dialogs.

Код:
if(PlayerInfo[playerid][p_description1])
{
		format(slot1, sizeof(slot1), "2\t%s\n", PlayerInfo[playerid][p_description1]);
}
if(PlayerInfo[playerid][p_description2] || PlayerInfo[playerid][p_premium] == 1)
{
		format(slot2, sizeof(slot2), "3\t%s\n", PlayerInfo[playerid][p_description2]);
}
if(PlayerInfo[playerid][p_description3] || PlayerInfo[playerid][p_premium] == 1)
{
		format(slot3, sizeof(slot3), "4\t%s\n", PlayerInfo[playerid][p_description3]);
}
format(string, sizeof(string), "#\tOpis\n0\tDodaj nowy opis\n1\tUsun widoczność opisu\n\n%s%s%s", slot1, slot2, slot3);
ShowPlayerDialog(playerid, DIALOG_DESCRIPTION_MENU, DIALOG_STYLE_TABLIST_HEADERS, "Zarządzanie opisami", string, "Wybierz", "Anuluj");
Код:
case DIALOG_DESCRIPTION_MENU:
{
	    	if(response == 1)
	    	{
      			new option, text[128];
	    		sscanf(inputtext, "ds[128]", option, text);
String text it;s empty.