Input line too long (after substitutions)
#1

Код:
format(string,sizeof(string),"# \tName \tAplications \n 1.\t{456FCF}Police Departament\t%s\n 2.\t{456FCF}F.B.I\t%s\n 3.\t{456FCF}National Guard\t%s\n 4.\t{CC0000}The Triad's Mafia\t%s\n 5.\t{668573}The Porrello Family\t%s\n 6.\t{2F2F2F}Sicilian Mafia\t%s\n 7.\t{BEFDBD}Government\t%s\n 8.\t{FFFFA8}Tow Truck Company\t%s\n9.\t{FFABFC}News Reporter\t%s\n 10.\t{885724}The Russian Mafia\t%s\n 11.\t{7E3937}Hitman Agency\t%s\n 12.\t{10E056}School Instructors\t%s\n 13.\t{FFFF00}Los Santos Taxi\t%s\n 14.\t{f86448}Paramedic\t%s",faction1,faction2,faction3,faction4);
Anyone help me with this errors:
Код:
: error 075: input line too long (after substitutions)
: error 037: invalid string (possibly non-terminated string)
: warning 215: expression has no effect
: error 001: expected token: ";", but found "}"
: warning 217: loose indentation
: error 017: undefined symbol "Police"
: fatal error 107: too many error messages on one line
Reply
#2

is your code in one line?? Whole code?
Reply
#3

yea. This code:
Код:
format(string,sizeof(string),"# \tName \tAplications \n 1.\t{456FCF}Police Departament\t%s\n 2.\t{456FCF}F.B.I\t%s\n 3.\t{456FCF}National Guard\t%s\n 4.\t{CC0000}The Triad's Mafia\t%s\n 5.\t{668573}The Porrello Family\t%s\n 6.\t{2F2F2F}Sicilian Mafia\t%s\n 7.\t{BEFDBD}Government\t%s\n 8.\t{FFFFA8}Tow Truck Company\t%s\n9.\t{FFABFC}News Reporter\t%s\n 10.\t{885724}The Russian Mafia\t%s\n 11.\t{7E3937}Hitman Agency\t%s\n 12.\t{10E056}School Instructors\t%s\n 13.\t{FFFF00}Los Santos Taxi\t%s\n 14.\t{f86448}Paramedic\t%s",faction1,faction2,faction3,faction4);
How i can decrease it?
Reply
#4

just press enter on some places. Don't make yor code too long,
so make like this
Код:
format(string,sizeof(string),"# \tName \tAplications \n, 
1.\t{456FCF}Police Departament\t%s\n, 
2.\t{456FCF}F.B.I\t%s\n, 
3.\t{456FCF}National Guard\t%s\n...
So put your whole code like that. And don't forget commas at end of line/ And like that your code will be more readable
Reply
#5

Код:
format(string,sizeof(string),"# \tName \tAplications \n,
		1.\t{456FCF}Police Departament\t%s\n,
		2.\t{456FCF}F.B.I\t%s\n,
		3.\t{456FCF}National Guard\t%s\n,
		4.\t{CC0000}The Triad's Mafia\t%s\n,
		5.\t{668573}The Porrello Family\t%s\n,
		6.\t{2F2F2F}Sicilian Mafia\t%s\n,
		7.\t{BEFDBD}Government\t%s\n,
		8.\t{FFFFA8}Tow Truck Company\t%s\n, 
		9.\t{FFABFC}News Reporter\t%s\n,
		10.\t{885724}The Russian Mafia\t%s\n,
		11.\t{7E3937}Hitman Agency\t%s\n,
		12.\t{10E056}School Instructors\t%s\n,
		13.\t{FFFF00}Los Santos Taxi\t%s\n,
		14.\t{f86448}Paramedic\t%s/",faction1,faction2,faction3,faction4);
like that?
Reply
#6

It should work
Reply
#7

it don't work i recivied this errors:
Код:
error 037: invalid string (possibly non-terminated string)
 warning 215: expression has no effect
warning 215: expression has no effect
error 001: expected token: ";", but found "."
error 029: invalid expression, assumed zero 
fatal error 107: too many error messages on one line
this is all comand:
Код:
CMD:factions(playerid, params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
	if(IsPlayerConnected(playerid))
	{
		new string[1028],faction1[15],faction2[15],faction3[15],faction4[15];
		if(DynamicFactions[1][fAplications] == 1) { faction1 = "{33AA33}Opened"; } else { faction1 = "{AA3333}Closed"; }
		if(DynamicFactions[2][fAplications] == 1) { faction2 = "{33AA33}Opened"; } else { faction2 = "{AA3333}Closed"; }
		if(DynamicFactions[3][fAplications] == 1) { faction3 = "{33AA33}Opened"; } else { faction3 = "{AA3333}Closed"; }
		if(DynamicFactions[4][fAplications] == 1) { faction4 = "{33AA33}Opened"; } else { faction4 = "{AA3333}Closed"; }
		format(string,sizeof(string),"# \tName \tAplications \n,
		1.\t{456FCF}Police Departament\t%s\n,
		2.\t{456FCF}F.B.I\t%s\n,
		3.\t{456FCF}National Guard\t%s\n,
		4.\t{CC0000}The Triad's Mafia\t%s\n,
		5.\t{668573}The Porrello Family\t%s\n,
		6.\t{2F2F2F}Sicilian Mafia\t%s\n,
		7.\t{BEFDBD}Government\t%s\n,
		8.\t{FFFFA8}Tow Truck Company\t%s\n, 
		9.\t{FFABFC}News Reporter\t%s\n,
		10.\t{885724}The Russian Mafia\t%s\n,
		11.\t{7E3937}Hitman Agency\t%s\n,
		12.\t{10E056}School Instructors\t%s\n,
		13.\t{FFFF00}Los Santos Taxi\t%s\n,
		14.\t{f86448}Paramedic\t%s/",faction1,faction2,faction3,faction4);
		ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_TABLIST_HEADERS, "Factions:", string,"Close", "");
	}
	return 1;
}
Reply
#8

Show me your lines of errors
Reply
#9

line 11 and 12 (format...)
Reply
#10

first remove thos "\n". The code will be better for reading. When fix errors add \n
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)