Dialog index out - 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 index out (
/showthread.php?tid=664854)
Dialog index out -
PoniStar - 13.03.2019
Hi i want to have about 25 line in dialog (list) but it will not show anything and not responde , and have some thing in samp server exe like array index out of bounse its ok with 15 list item but i want 25
Код:
static str[3500],head[3500];
strcat(head,"Name\n");
for(new i=0; i < 25; i++) //edit
{
format(str, sizeof(str), "%d {f9dfc5}%s\n", i,ClanN[listitem][i]);
strcat(head,str);
}
ShowPlayerDialog(playerid, DIALOG_head,DIALOG_STYLE_TABLIST_HEADERS, "List", head, "Done", "");
Re: Dialog index out -
Kaliber - 13.03.2019
Dont use static, use new here!
PHP код:
new str[sizeof(ClanN[])*34] = "Name";
for(new i; i < sizeof(ClanN[]); i++) //edit
{
format(str, sizeof(str), "%s\n%d {f9dfc5}%s",str,i,ClanN[listitem][i]);
}
ShowPlayerDialog(playerid, DIALOG_head,DIALOG_STYLE_TABLIST_HEADERS, "List", str, "Done", "");
Re: Dialog index out -
PoniStar - 13.03.2019
#define MAX_CLANS 16
new ClanN [MAX_CLANS][25][255];
Re: Dialog index out -
PoniStar - 13.03.2019
Quote:
Originally Posted by Kaliber
Dont use static, use new here!
PHP код:
new str[sizeof(ClanN[])*34] = "Name";
for(new i; i < sizeof(ClanN[]); i++) //edit
{
format(str, sizeof(str), "%s\n%d {f9dfc5}%s",str,i,ClanN[listitem][i]);
}
ShowPlayerDialog(playerid, DIALOG_head,DIALOG_STYLE_TABLIST_HEADERS, "List", str, "Done", "");
|
not worked
Re: Dialog index out -
PoniStar - 13.03.2019
problem fixed thnx guyz