DIALOG_STYLE_MSGBOX : problem
#1

i just confused while adding DIALOG_STYLE_MSGBOX its limited i can't add much text but i saw some where we can add many words on on DIALOG_STYLE_MSGBOX


Here is mine



Here Other


how i can upgrade it i want to add many words on all pages : can any one help me
Reply
#2

Use strcat, Example :

pawn Код:
new string[300];
strcat(string, "Word\n");
strcat(string, "Word\n");
strcat(string, "Word\n");
strcat(string, "Word\n");
strcat(string, "Word\n");
strcat(string, "Word\n");
strcat(string, "Word\n");
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, "Hmm", string, "Close", "");
Reply
#3

this is increasing size of words ? new string[300];

if i change it to new string[600]; then what will happened ?
Reply
#4

Quote:
Originally Posted by Saleem
Посмотреть сообщение
this is increasing size of words ? new string[300];

if i change it to new string[600]; then what will happened ?
It will allow you to add more text.
Reply
#5

Quote:
Originally Posted by Saleem
Посмотреть сообщение
this is increasing size of words ? new string[300];

if i change it to new string[600]; then what will happened ?
The number after a variable indicates how big the array size is, in fact you should see an array as all boxes, Variable[2] therefor has 2 boxes, in box 0 ( Variable[0] ) you can insert a number or letter and in box 1 ( Variable[1] ) you can insert a number or letter. So, as you asked, "new string[300]" can hold up to 300 characters ( 0 - 299 ) and if you change 300 to 600 it can hold up to 600 characters ( 0 - 599 ).

I hope you understand it a little bit,

best regards,
Jesse
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)