error 075: input line too long (after substitutions)
#1

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? :/
Reply
#2

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", "");
Reply
#3

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", "");
Reply
#4

Quote:
Originally Posted by Unknownich
View Post
Delete somthing, example
funny guy e_e

---------------------
Quote:
Originally Posted by L0zaix
View Post
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
Reply
#5

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
Reply
#6

Quote:
Originally Posted by Babul
View Post
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
Reply
#7

yes, strcat is better for formatting variables into one huge string, my example above depends on the fact that the /cmds is static.
Reply
#8

oh, ok, thanks everyone.
Reply
#9

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?
Reply
#10

LOL XD
this is so easy
i've tried to fix my dialog, but its too hard for a newbie like me

thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)