input line too long - 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: input line too long (
/showthread.php?tid=426907)
input line too long -
Immortal_LTU - 30.03.2013
hello how i can fix this big line .
error :
Quote:
error 075: input line too long (after substitutions)
|
Quote:
ShowPlayerDialog(playerid, 1112, DIALOG_STYLE_MSGBOX, "Welcome / Sveiki Atvyke !", "{FFFFFF}Welcome To Our Server ! / {FFFFFF}Sveiki Atvyke i Musu Serveri !\n \nThe predominant language in this server is : Lithuanian.\n{FFFFFF}Because the half of players are from other countries we set language to English.\nU can change language by typing :\n\n{FFFF00}/LTU {FFFFFF}- For Lithuanian \n\n{FFFF00}/ENG {FFFFFF}- For English\n\n{FFFFFF}Pagrindine sio serverio kalba yra : Anglu.\n{FFFFFF}Daugybe sio serverio zaideju yra is kitu pasaulio saliu , mes nustateme kalba i Anglu.\nKalba galite pakeisti rasydami:\n\n{FFFF00}/LTU {FFFFFF}- Lietuviu Kalba\n\n{FFFF00}/ENG {FFFFFF}- Anglu Kalba", "Ok", "");
|
http://pastebin.com/wLtr0njA
Re: input line too long -
zombieking - 30.03.2013
Split it up maybe? Or use strcat?
Re: input line too long -
Immortal_LTU - 30.03.2013
I don't know how to use strcat , so maaaany errors ...
Re: input line too long -
Konstantinos - 30.03.2013
Use either strcat or just '\'.
pawn Код:
// Examples:
"blablabla \
blablabla \
blablabla \
blablabla
"
// OR
new
string[ 128 ] // If the lenght is longer, change it.
;
strcat(string, "blablabla");
strcat(string, "blablabla");
strcat(string, "blablabla");
strcat(string, "blablabla");
Re: input line too long -
zombieking - 30.03.2013
pawn Код:
new long_string[632];
strcat(long_string,"{FFFFFF}Welcome To Our Server ! / {FFFFFF}Sveiki Atvyke i Musu Serveri !\n \nThe predominant language in this server is : Lithuanian.\n");
strcat(long_string,"{FFFFFF}Because the half of players are from other countries we set language to English.\nU can change language by typing :\n\n{FFFF00}/LTU {FFFFFF}");
strcat(long_string,"- For Lithuanian \n\n{FFFF00}/ENG {FFFFFF}- For English\n\n{FFFFFF}Pagrindine sio serverio kalba yra : Anglu.\n{FFFFFF}Daugybe sio serverio zaideju yra is kitu pasaulio saliu , mes nustateme kalba i Anglu.\n");
strcat(long_string,"Kalba galite pakeisti rasydami:\n\n{FFFF00}/LTU {FFFFFF}- Lietuviu Kalba\n\n{FFFF00}/ENG {FFFFFF}- Anglu Kalba");
ShowPlayerDialog(playerid, 1112, DIALOG_STYLE_MSGBOX, "Welcome / Sveiki Atvyke !", long_string, "Ok", "");
This should work.
Re: input line too long -
Immortal_LTU - 30.03.2013
Quote:
Originally Posted by zombieking
pawn Код:
new long_string[632]; strcat(long_string,"{FFFFFF}Welcome To Our Server ! / {FFFFFF}Sveiki Atvyke i Musu Serveri !\n \nThe predominant language in this server is : Lithuanian.\n"); strcat(long_string,"{FFFFFF}Because the half of players are from other countries we set language to English.\nU can change language by typing :\n\n{FFFF00}/LTU {FFFFFF}"); strcat(long_string,"- For Lithuanian \n\n{FFFF00}/ENG {FFFFFF}- For English\n\n{FFFFFF}Pagrindine sio serverio kalba yra : Anglu.\n{FFFFFF}Daugybe sio serverio zaideju yra is kitu pasaulio saliu , mes nustateme kalba i Anglu.\n"); strcat(long_string,"Kalba galite pakeisti rasydami:\n\n{FFFF00}/LTU {FFFFFF}- Lietuviu Kalba\n\n{FFFF00}/ENG {FFFFFF}- Anglu Kalba"); ShowPlayerDialog(playerid, 1112, DIALOG_STYLE_MSGBOX, "Welcome / Sveiki Atvyke !", long_string, "Ok", "");
This should work.
|
Thanks so much !! +Rep
Re: input line too long -
LarzI - 30.03.2013
Quote:
Originally Posted by Dwane
or just '\'.
[pawn]
// Examples:
"blablabla \
blablabla \
blablabla \
blablabla
"
|
That doesn't actually work out the error.
Re: input line too long -
Konstantinos - 30.03.2013
Quote:
Originally Posted by LarzI
That doesn't actually work out the error.
|
As I've mentioned to previous posts, it does work but not everytime when the line is extremely long.