Creating a looong MsgBox - [L3th4l] - 12.08.2010
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
Re: Creating a looong MsgBox -
ikey07 - 12.08.2010
Message box as?
you mean dialogs?
Re: Creating a looong MsgBox - [L3th4l] - 12.08.2010
Ofc, sorry if y'all didn't get that ;P
Re: Creating a looong MsgBox -
Dudits - 12.08.2010
"Input too long after substitution" is pawno wise, just go somewhere in the middle of the line and press enter, it will work.
Re: Creating a looong MsgBox -
Simon - 12.08.2010
You'll have to merge several smaller strings to make a longer one.
pawn Код:
new
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.
Re: Creating a looong MsgBox -
HotPlayer - 02.09.2011
Great its work!
Re: Creating a looong MsgBox -
Lorenc_ - 02.09.2011
Quote:
Originally Posted by HotPlayer
Great its work!
|
Can I give you some negative rep for spamming like a beech?
Re: Creating a looong MsgBox -
Improvement™ - 02.09.2011
Quote:
Originally Posted by HotPlayer
Great its work!
|
Lmao.
Please don't bump old sloved topic's, look at the dates..
Re: Creating a looong MsgBox -
Davz*|*Criss - 02.09.2011
On top:
OnGameModeInit
Example cmd for long dialog:
pawn Код:
CMD:longdialog(playerid, params[])
{
ShowPlayerDialog(playerid,69333, DIALOG_STYLE_MSGBOX,"Long Dialog.",LongDialog, "Okay", "Exit");
return 1;
}
And anywhere in script:
pawn Код:
SetUpMyText()
{
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.