Dialog lists..
#1

How the hell do I make a dialog list with 110 items?

If I do it on one line, it wont fit, so i tried the

blabla\n\
blablabla\n\
etc.

thing, and it gave an error: input line too long (after substitutions).

Without formatting a string, how can I do it..?
Reply
#2

da format.

pawn Код:
new reallylongstring[1500];
format(reallylongstring, sizeof(reallylongstring), "item1\nitem2\ni3\ni4");
format(reallylongstring, sizeof(reallylongstring), "%sitem5\nitem6\ni7\ni8", reallylongstring);
format(reallylongstring, sizeof(reallylongstring), "%sitem9\nitem10\ni11\ni12", reallylongstring);
Reply
#3

I don't want to do it like that. There must be another way.
Reply
#4

Do as Daren_Jacobson told you or just do it like this:

pawn Код:
format(reallylongstring, sizeof(reallylongstring), "item_1\nitem_2\nitem_3\nitem_4\nitem_5\
\nitem_6\nitem_7\nitem_8\nitem_9\nitem_10\
\nitem_11\nitem_12\nitem_13\nitem_14\nitem_15\
\nitem_16\nitem_17\nitem_18\nitem_19\nitem_20\
\nitem_and_so_on.."
);
Reply
#5

You don't have to use 'format()' to produce the 'substitutions' error, it's the string limitation (507 IIRC).

Also what's wrong with formatting the string ?

You could use strins or strmid I suppose but I don't understand why you don't want to use the functions provided for doing this, that's the whole reason we have those functions.

What are you putting in the string, is it raw (you're typing it) or is it from an array or another source ?
Reply
#6

Quote:
Originally Posted by Donny
You don't have to use 'format()' to produce the 'substitutions' error, it's the string limitation (507 IIRC).

Also what's wrong with formatting the string ?

You could use strins or strmid I suppose but I don't understand why you don't want to use the functions provided for doing this, that's the whole reason we have those functions.

What are you putting in the string, is it raw (you're typing it) or is it from an array or another source ?
It's raw, not using any unneccecary memory, but i'll have to format() I guess.
Reply
#7

You could always split the dialog up and have a "more" or "next" option in the list or use the 'button' params to do it, if the response is true then goto the next one and so on.
Reply
#8

The reason for me using a dialog instead of GTA menus is because I didn't want that.

It works fine now.
Reply
#9

Panels are ugly anyway I prefer dialogs, good to know it's sorted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)