DIALOG_STYLE_MSGBOX : problem - 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_STYLE_MSGBOX : problem (
/showthread.php?tid=445488)
DIALOG_STYLE_MSGBOX : problem -
Saleem - 21.06.2013
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
Re: DIALOG_STYLE_MSGBOX : problem -
SilverKiller - 21.06.2013
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", "");
Re: DIALOG_STYLE_MSGBOX : problem -
Saleem - 22.06.2013
this is increasing size of words ?
new string[300];
if i change it to new string[600]; then what will happened ?
Re: DIALOG_STYLE_MSGBOX : problem -
ArmandoRamiraz - 22.06.2013
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.
Re: DIALOG_STYLE_MSGBOX : problem -
jessejanssen - 22.06.2013
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