error 075: input line too long (after substitutions) -
emokidx - 20.02.2012
pawn Code:
ShowPlayerDialog(playerid, 44, DIALOG_STYLE_MSGBOX, "Help", "[Server Commands]/credits,/help,/kill,/afk,/back,/me,/v,/givecash,/fix,/flip,/tts,/ttsstop,/skin,/report,/admin,/pm,/admins,/radio\n[Server Commands]/addboject,/objectids,/boneids\n[Admin Commands (1)]/s,/soff,/explode,/slap,/mute,/unmute\n[Admin Commands (2)]/duty,/dutyoff,/fr(eeze),/unfr(eeze),/cc\n[Admin Commands (3)]/rac,/recon\n[Admin Commands (4)]/bring,/goto,/heal,/healall,/adminradio,/radiooff\n[Admin Commands (5)]/gmx", "OK", "");
what should i do? :/
Re: error 075: input line too long (after substitutions) -
Unknownich - 20.02.2012
Delete somthing, example
pawn Code:
ShowPlayerDialog(playerid, 44, DIALOG_STYLE_MSGBOX, "Help", "[Server Commands]/credits,/help,/kill,/afk,/back,/me,/v,/givecash,/fix,/flip,/tts,/ttsstop,/skin,/report,/admin,/pm,/admins,/radio\n[Server Commands]/addboject,/objectids,/boneids\n[Admin Commands (1)]/s,/soff,/explode,/slap,/mute,/unmute\n[Admin Commands (2)]/duty,/dutyoff,/fr(eeze),/unfr(eeze),/cc\n[Admin Commands (3)]/rac,/recon\n[Admin Commands (4)]/bring,/goto,/heal,/healall,/adminradio,/radiooff", "OK", "");
Re: error 075: input line too long (after substitutions) -
L0zaix - 20.02.2012
your dialog is to long.
you can use strcat.
heres the code for you:
pawn Code:
new string[952];
strcat(string, "[Server Commands]/credits,/help,/kill,/afk,/back,/me,/v,/givecash,/fix,/flip,/tts,/ttsstop,/skin,/report,/admin,/pm,/admins,/radio\n");
strcat(string, "[Server Commands]/addboject,/objectids,/boneids\n");
strcat(string, "[Admin Commands (1)]/s,/soff,/explode,/slap,/mute,/unmute\n");
strcat(string, "[Admin Commands (2)]/duty,/dutyoff,/fr(eeze),/unfr(eeze),/cc\n");
strcat(string, "[Admin Commands (3)]/rac,/recon\n");
strcat(string, "[Admin Commands (4)]/bring,/goto,/heal,/healall,/adminradio,/radiooff\n");
strcat(string, "[Admin Commands (5)]/gmx");
ShowPlayerDialog(playerid, 44, DIALOG_STYLE_MSGBOX, "Help", string, "OK", "");
Re: error 075: input line too long (after substitutions) -
emokidx - 20.02.2012
Quote:
Originally Posted by Unknownich
Delete somthing, example
|
funny guy e_e
---------------------
Quote:
Originally Posted by L0zaix
your dialog is to long.
you can use strcat.
heres the code for you:
pawn Code:
new string[952]; strcat(string, "[Server Commands]/credits,/help,/kill,/afk,/back,/me,/v,/givecash,/fix,/flip,/tts,/ttsstop,/skin,/report,/admin,/pm,/admins,/radio\n"); strcat(string, "[Server Commands]/addboject,/objectids,/boneids\n"); strcat(string, "[Admin Commands (1)]/s,/soff,/explode,/slap,/mute,/unmute\n"); strcat(string, "[Admin Commands (2)]/duty,/dutyoff,/fr(eeze),/unfr(eeze),/cc\n"); strcat(string, "[Admin Commands (3)]/rac,/recon\n"); strcat(string, "[Admin Commands (4)]/bring,/goto,/heal,/healall,/adminradio,/radiooff\n"); strcat(string, "[Admin Commands (5)]/gmx"); ShowPlayerDialog(playerid, 44, DIALOG_STYLE_MSGBOX, "Help", string, "OK", "");
|
thnx, i forgot about the srtcat
Re: error 075: input line too long (after substitutions) -
Babul - 20.02.2012
no need to delete something. the compilers' parser cant handle too long lines. break them up by using a simple return, maybe with the escaping character \ to avoid the compiler thinking its a line end:
pawn Code:
ShowPlayerDialog(playerid, 44, DIALOG_STYLE_MSGBOX, "Help", "[Server Commands]/credits,/help,/kill,/afk,/back,/me,/v,/givecash,/fix,/flip,/tts,/ttsstop,/skin,/report,/admin,/pm,/admins,/radio\n\
[Server Commands]/addboject,/objectids,/boneids\n[Admin Commands (1)]/s,/soff,/explode,/slap,/mute,/unmute\n[Admin Commands (2)]/duty,/dutyoff,/fr(eeze),/unfr(eeze),/cc\n\
[Admin Commands (3)]/rac,/recon\n[Admin Commands (4)]/bring,/goto,/heal,/healall,/adminradio,/radiooff\n[Admin Commands (5)]/gmx", "OK", "");
i hope those 3 lines are short enough. if it still complains, add some \ in between yor lines, heres an extreme example:
pawn Code:
String="This\
is\
a\
long\
line,\
too.";
dont forget to add spaces, the string above is "Thisisalongline,too."
edit: some of my dialog strings are 4096 chars long, so no, the string lenght is not the reason
Re: error 075: input line too long (after substitutions) -
L0zaix - 20.02.2012
Quote:
Originally Posted by Babul
no need to delete something. the compilers' parser cant handle too long lines. break them up by using a simple return, maybe with the escaping character \ to avoid the compiler thinking its a line end:
pawn Code:
ShowPlayerDialog(playerid, 44, DIALOG_STYLE_MSGBOX, "Help", "[Server Commands]/credits,/help,/kill,/afk,/back,/me,/v,/givecash,/fix,/flip,/tts,/ttsstop,/skin,/report,/admin,/pm,/admins,/radio\n\ [Server Commands]/addboject,/objectids,/boneids\n[Admin Commands (1)]/s,/soff,/explode,/slap,/mute,/unmute\n[Admin Commands (2)]/duty,/dutyoff,/fr(eeze),/unfr(eeze),/cc\n\ [Admin Commands (3)]/rac,/recon\n[Admin Commands (4)]/bring,/goto,/heal,/healall,/adminradio,/radiooff\n[Admin Commands (5)]/gmx", "OK", "");
i hope those 3 lines are short enough. if it still complains, add some \ in between yor lines, heres an extreme example:
pawn Code:
String="This\ is\ a\ long\ line,\ too.";
dont forget to add spaces, the string above is "Thisisalongline,too."
|
you can also use strcat. for me strcat is more easier. anyway nice babul
Re: error 075: input line too long (after substitutions) -
Babul - 20.02.2012
yes, strcat is better for formatting variables into one huge string, my example above depends on the fact that the /cmds is static.
Re: error 075: input line too long (after substitutions) -
emokidx - 20.02.2012
oh, ok, thanks everyone.
Re: error 075: input line too long (after substitutions) -
Babul - 20.02.2012
mhm, i have to admit that iam still re-format()ting long strings - it seems that i have to revise some of my code again.. well, learning never ends. ty for forcing me to freshen up my string routines:
my actual (often used)
pawn Code:
format(string,sizeof(string),"%s%s",string,stringADD);
is worse than
pawn Code:
strcat(string,stringADD);
? if i got a really long string[4096] for a dialog, i need the \ only for a \n or \r\n. it will take me a long time to get used to them using in the sourcecode directly. so basically, when compiling, the \
char is just cosmetic, if not used IN strings?
Re: error 075: input line too long (after substitutions) -
AiRaLoKa - 07.09.2013
LOL XD
this is so easy
i've tried to fix my dialog, but its too hard for a newbie like me
thanks anyway