View Full Version : Creating a looong MsgBox

12/08/2010, 06:05 AM
So as the title, i tried several ways to get a looong msg box. but always get the "Input too long after substitution" error

I seen several servers using long msg box, for example- the ones in gamerx.

So yeah, i was wondering how it should be done. Thanx

12/08/2010, 06:29 AM
Message box as?

you mean dialogs?

12/08/2010, 06:34 AM
Ofc, sorry if y'all didn't get that ;P

12/08/2010, 06:45 AM
"Input too long after substitution" is pawno wise, just go somewhere in the middle of the line and press enter, it will work.

12/08/2010, 09:19 AM
You'll have to merge several smaller strings to make a longer one.

myLongString[2048] = "This is the first half of my string. It's quite long. ";

strcat(myLongString, "We can make it longer by adding to the string at ");
strcat(myLongString, "runtime. That's pretty cool nifty huh? It would be ");
strcat(myLongString, "nicer if we could do this before compiling, but oh ");
strcat(myLongString, "well. Please note this is all on one line. There are ");
strcat(myLongString, "no newline characters present in the strings.");

print(myLongString); // Print it just incase the ShowPlayerDialog doesn't work.
ShowPlayerDialog(playerid, 7331, DIALOG_STYLE_MSGBOX, "Test", myLongString, "OK", "NOT OK");

I'm not sure if ShowPlayerDialog will show a dialog this wide, however the theory behind making a long string using strcat should work.

02/09/2011, 06:46 AM
Great its work!

02/09/2011, 06:52 AM
Great its work!

Can I give you some negative rep for spamming like a beech?

02/09/2011, 07:02 AM
Great its work!

Please don't bump old sloved topic's, look at the dates..

02/09/2011, 07:37 AM
On top:

new LongDialog [1024];



Example cmd for long dialog:

CMD:longdialog(playerid, params[])
ShowPlayerDialog(playerid,69333, DIALOG_STYLE_MSGBOX,"Long Dialog.",LongDialog, "Okay", "Exit");
return 1;

And anywhere in script:

LongDialog = "Bla bla bla \n";
strcat(LongDialog, "Bla bla.\n");
strcat(LongDialog, "Bla bla.\n");
return 1;

You can go on with long dialogs on strcat.