Dynamic dialog items
#1

Hi! Can you help with problem? I use YSI libraries.
I need to get dialog items from DB and show them in listbox. But it don't show more than 128 chars. How can I solve this?
My code:

pawn code:
Код:
... /* sql query */
new parttypesList[1024];
for (new i=0; i < cache_get_row_count(); i++) {
    new item[64], parttype[60];
    cache_get_field_content(i, "name", parttype);
	    
    format(item, sizeof(item), "%s\n", parttype);
    strcat(parttypesList, item);
}
	
Text_ListBox(playerid, using inline OnPartTypesDialog, $DIALOG_PARTTYPES_CAPTION, $DIALOG_LIST, $DIALOGS_OK, $DIALOGS_CANCEL, parttypesList);
...
lang.ru file:
Код:
...
DIALOG_LIST = %s
...
Reply
#2

up ^
Reply
#3

change
pawn Код:
item[64]
pawn Код:
pattype[64]
to
pawn Код:
item[128]
pawn Код:
pattype[128]
Reply
#4

No, it's not working.

I think it is depends on limit of strings in language file (128 chars). How to increase it?
Reply
#5

up ^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)