Dialog index out
#1

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", "");
Reply
#2

Dont use static, use new here!

PHP код:
new str[sizeof(ClanN[])*34] = "Name";
for(new 
isizeof(ClanN[]); i++) //edit
{
    
format(strsizeof(str), "%s\n%d {f9dfc5}%s",str,i,ClanN[listitem][i]);
}
ShowPlayerDialog(playeridDIALOG_head,DIALOG_STYLE_TABLIST_HEADERS"List"str"Done"""); 
Reply
#3

#define MAX_CLANS 16
new ClanN [MAX_CLANS][25][255];
Reply
#4

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
Dont use static, use new here!

PHP код:
new str[sizeof(ClanN[])*34] = "Name";
for(new 
isizeof(ClanN[]); i++) //edit
{
    
format(strsizeof(str), "%s\n%d {f9dfc5}%s",str,i,ClanN[listitem][i]);
}
ShowPlayerDialog(playeridDIALOG_head,DIALOG_STYLE_TABLIST_HEADERS"List"str"Done"""); 
not worked
Reply
#5

problem fixed thnx guyz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)