error 037: invalid string (possibly non-terminated string)
#1

This is the command where is the error:
Code:
CMD:hqs(playerid, params[])
{
	if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te loghezi.");
	if(IsPlayerConnected(playerid))
	{
		if(CP[playerid] != 0) return SendClientMessage(playerid, COLOR_GOLD, "Ai deja un punct rosu activ. Foloseste comanda '/killcp' pentru a renunta la el.");
		{
			ShowPlayerDialog(playerid, dGPS+3, DIALOG_STYLE_TABLIST_HEADERS, "HQ-uri", "Factiune\tTip\nLos Santos Police Departament\t{D2B48C}Departament\nSan Fierro Police Departament\t{D2B48C}Departament
			\nLas Venturas Police Departament\t{D2B48C}Departament\nFederal Bureau of Investigation\t{FFA500}Departament\nNational Guard\t{FFA500}Departament\nMayor\t{FFA500}Mixt Faction\nParamedic\t{FFFFFF}Peaceful Faction
			\nTow Truck Company\t{FFFFFF}Peaceful Faction\nNews Reporters\t{FFFFFF}Peaceful Faction\nHitman Agency\t{FFA500}Mixt Faction\nLos Santos School Instructors\t{D2B48C}Peaceful Faction\nLos Santos Taxi\t{FFFFFF}Peaceful Faction
			\nSan Fierro School Instructors\t{FFFFFF}Peaceful Faction\nSan Fierro Taxi\t{FFFFFF}Peaceful Faction\nLas Venturas School Instructors\t{FFFFFF}Peaceful Faction\nLas Venturas Taxi\t{FFFFFF}Peaceful Faction\nGrove Street\t{FFFFFF}Gang
			\nThe Ballas\t{FFFFFF}Gang\nLos Santos Vagos\t{FFFFFF}Gang\n69 Pier Mobs\t{FFFFFF}Gang\nSan Fierro Rifa\t{FFFFFF}Gang\nDa Nang Boys\t{FFFFFF}Gang\nThe Russian Bratva\t{FFFFFF}Gang\nYakuza\t{FFFFFF}Gang\nSindacco Family", "OK", "Cancel");
			
		}
	}
	return 1;
}
How can i solve this
Reply
#2

Just do it in 1 line, don't create a new line for each \n you put, do it like this
Code:
"Hello\nthis text will be showed under Hello"
Reply
#3

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

Create a string and use strcat for matters like this one

https://sampwiki.blast.hk/wiki/Strcat
Reply
#5

Quote:
Originally Posted by AnoTek
View Post
error 075: input line too long (after substitutions)
Use strcat.

Example

Code:
stock HelpText
{
    new HelpTextz[1024];
    HelpTextz[0]='\0';
    strcat(HelpTextz,"Hello this can be much longer");
    strcat(HelpTextz,"You can write everything you want");
    return HelpTextz;
}
In your dialog
Code:
ShowPlayerDialog(playerid, dGPS+3, DIALOG_STYLE_TABLIST_HEADERS, "HQ-uri",HelpText(),"Ok","");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)