input line too long
#1

hello,
my input line is to long, how i can breakte it right.
i think with "\" at the end but it will not work.
can anyone show me how its right

error:

Код:
error 075: input line too long (after substitutions)
my to long code without edit (break line):
Код:
format(string, sizeof(string), "{FF0000}[SPIELERDATEN]\n{00FF00}[NAME] {FFFFFF}%s {00FF00}[ID]{FFFFFF} %d\n{00FF00}[GETЦTET] {FFFFFF}%d\n{00FF00}[GESTORBEN] {FFFFFF}%d\n\n{FF0000}[FINANZEN]\n{00FF00}[GELD] ${FFFFFF}%d\n{00FF00}[BANKGUTHABEN] ${FFFFFF}%d\n\n{FF0000}[SKILLINFO]\n{00FF00}[SKILL] {FFFFFF}%d/10\n{00FF00}[LEVEL] {FFFFFF}%d\n{00FF00}[SPIELZEIT] {FFFFFF}%d {00FF00}Tage {FFFFFF}%d:%d:%d {00FF00}Stunden\n{00FF00}[VIP-RANK] {FFFFFF}%s (%d)\n\n{FF0000}[ANDERE DATEN]\n{00FF00}[WANTED LEVEL] {FFFFFF}%d\n{00FF00}[WANTED WAHRSCHEINLICHKEIT] {FFFFFF}%d",
SpielerNameAnzeige(playerid), playerid, SpielerInfo[playerid][pKills], SpielerInfo[playerid][pDeaths], SpielerInfo[playerid][pMoney], SpielerInfo[playerid][pBankMoney], SpielerInfo[playerid][pSkill], SpielerInfo[playerid][pLevel], SpielerInfo[playerid][pPlayerTimeDay], SpielerInfo[playerid][pPlayerTimeHour], SpielerInfo[playerid][pPlayerTimeMin], SpielerInfo[playerid][pPlayerTimeSec], VIPName, SpielerInfo[playerid][pVIPLevel], SpielerInfo[playerid][pWanted, VIPRandomWanted]);
Reply
#2

Try this:

pawn Код:
format(string, sizeof(string), "{FF0000}[SPIELERDATEN]\n{00FF00}[NAME] {FFFFFF}%s {00FF00}[ID]{FFFFFF} %d\n{00FF00}[GETЦTET] {FFFFFF}%d\n{00FF00}[GESTORBEN] {FFFFFF}%d\n\n",SpielerNameAnzeige(playerid), playerid, SpielerInfo[playerid][pKills], SpielerInfo[playerid][pDeaths]);
format(string, sizeof(string), "%s{FF0000}[FINANZEN]\n{00FF00}[GELD] ${FFFFFF}%d\n{00FF00}[BANKGUTHABEN] ${FFFFFF}%d\n\n{FF0000}[SKILLINFO]\n{00FF00}[SKILL] {FFFFFF}%d/10\n",string, SpielerInfo[playerid][pMoney], SpielerInfo[playerid][pBankMoney], SpielerInfo[playerid][pSkill]);
format(string, sizeof(string), "%s{00FF00}[LEVEL] {FFFFFF}%d\n{00FF00}[SPIELZEIT] {FFFFFF}%d {00FF00}Tage {FFFFFF}%d:%d:%d {00FF00}Stunden\n",string, SpielerInfo[playerid][pLevel], SpielerInfo[playerid][pPlayerTimeDay], SpielerInfo[playerid][pPlayerTimeHour], SpielerInfo[playerid][pPlayerTimeMin], SpielerInfo[playerid][pPlayerTimeSec]);
format(string, sizeof(string), "%s{00FF00}[VIP-RANK] {FFFFFF}%s (%d)\n\n{FF0000}[ANDERE DATEN]\n{00FF00}[WANTED LEVEL] {FFFFFF}%d\n{00FF00}[WANTED WAHRSCHEINLICHKEIT] {FFFFFF}%d",string, VIPName, SpielerInfo[playerid][pVIPLevel], SpielerInfo[playerid][pWanted, VIPRandomWanted]);
Reply
#3

Use search or ****** next time,

https://sampforum.blast.hk/showthread.php?tid=340072
Reply
#4

ok now it works thx for help,

Код:
	if(SpielerInfo[playerid][pAdmin] == 0)
	{
        format(string, sizeof(string), "{FF0000}[SPIELERDATEN]\n{00FF00}[NAME] {FFFFFF}%s {00FF00}[ID]{FFFFFF} %d\n{00FF00}[GETЦTET] {FFFFFF}%d\n{00FF00}[GESTORBEN] {FFFFFF}%d", SpielerNameAnzeige(playerid), playerid, SpielerInfo[playerid][pKills], SpielerInfo[playerid][pDeaths]);
		format(string, sizeof(string), "%s\n\n{FF0000}[FINANZEN]\n{00FF00}[GELD] ${FFFFFF}%d\n{00FF00}[BANKGUTHABEN] ${FFFFFF}%d\n\n{FF0000}[SKILLINFO]\n{00FF00}[SKILL] {FFFFFF}%d/10", string, SpielerInfo[playerid][pMoney], SpielerInfo[playerid][pBankMoney], SpielerInfo[playerid][pSkill]);
		format(string, sizeof(string), "%s\n{00FF00}[LEVEL] {FFFFFF}%d\n{00FF00}[SPIELZEIT] {FFFFFF}%d {00FF00}Tage {FFFFFF}%d:%d:%d {00FF00}Stunden", string, SpielerInfo[playerid][pLevel], SpielerInfo[playerid][pPlayerTimeDay], SpielerInfo[playerid][pPlayerTimeHour], SpielerInfo[playerid][pPlayerTimeMin], SpielerInfo[playerid][pPlayerTimeSec]);
		format(string, sizeof(string), "%s\n{00FF00}[VIP-RANK] {FFFFFF}%s (%d)\n\n{FF0000}[ANDERE DATEN]\n{00FF00}[WANTED LEVEL] {FFFFFF}%d\n{00FF00}[WANTED WAHRSCHEINLICHKEIT] {FFFFFF}%s", string, VIPName, SpielerInfo[playerid][pVIPLevel], SpielerInfo[playerid][pWanted], VIPRandomWanted);
	}

	strcat(string, string, sizeof(string));
	ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, "{FF0000}Bloodz {FFFFFF}n {00FF00}Cripz {FFFFFF}- {FFFF00}Stats", string, "SchlieЯen", "");
    return 1;
Reply
#5

another problem,
now my corde works but it shows to many
It mus stop at the red line



my code now:
Код:
CMD:stats(playerid, params[])
{
	new string[600], VIPName[50], VIPRandomWanted[50];
	if(SpielerInfo[playerid][pVIPLevel] == 0)
	{
	    VIPName = "Keine";
	    VIPRandomWanted = "10%";
	}
	else if(SpielerInfo[playerid][pVIPLevel] == 1)
	{
	    VIPName = "Silber";
	    VIPRandomWanted = "20%";
	}
	else if(SpielerInfo[playerid][pVIPLevel] == 2)
	{
	    VIPName = "Gold";
	    VIPRandomWanted = "25%";
	}

	if(SpielerInfo[playerid][pAdmin] == 0)
	{
        format(string, sizeof(string), "{FF0000}[SPIELERDATEN]\n{00FF00}[NAME] {FFFFFF}%s {00FF00}[ID]{FFFFFF} %d\n{00FF00}[GETЦTET] {FFFFFF}%d\n{00FF00}[GESTORBEN] {FFFFFF}%d", SpielerNameAnzeige(playerid), playerid, SpielerInfo[playerid][pKills], SpielerInfo[playerid][pDeaths]);
		format(string, sizeof(string), "%s\n\n{FF0000}[FINANZEN]\n{00FF00}[GELD] ${FFFFFF}%d\n{00FF00}[BANKGUTHABEN] ${FFFFFF}%d\n\n{FF0000}[SKILLINFO]\n{00FF00}[SKILL] {FFFFFF}%d/10", string, SpielerInfo[playerid][pMoney], SpielerInfo[playerid][pBankMoney], SpielerInfo[playerid][pSkill]);
		format(string, sizeof(string), "%s\n{00FF00}[LEVEL] {FFFFFF}%d\n{00FF00}[SPIELZEIT] {FFFFFF}%d {00FF00}Tage {FFFFFF}%d:%d:%d {00FF00}Stunden", string, SpielerInfo[playerid][pLevel], SpielerInfo[playerid][pPlayerTimeDay], SpielerInfo[playerid][pPlayerTimeHour], SpielerInfo[playerid][pPlayerTimeMin], SpielerInfo[playerid][pPlayerTimeSec]);
		format(string, sizeof(string), "%s\n{00FF00}[VIP-RANK] {FFFFFF}%s (%d)\n\n{FF0000}[ANDERE DATEN]\n{00FF00}[WANTED LEVEL] {FFFFFF}%d\n{00FF00}[WANTED WAHRSCHEINLICHKEIT] {FFFFFF}%s", string, VIPName, SpielerInfo[playerid][pVIPLevel], SpielerInfo[playerid][pWanted], VIPRandomWanted);
	}

	if(SpielerInfo[playerid][pAdmin] >= 1)
	{
		format(string, sizeof(string), "{FF0000}[SPIELERDATEN]\n{00FF00}[NAME] {FFFFFF}%s {00FF00}[ID]{FFFFFF} %d\n{00FF00}[GETЦTET] {FFFFFF}%d\n{00FF00}[GESTORBEN] {FFFFFF}%d", SpielerNameAnzeige(playerid), playerid, SpielerInfo[playerid][pKills], SpielerInfo[playerid][pDeaths]);
		format(string, sizeof(string), "%s\n\n{FF0000}[FINANZEN]\n{00FF00}[GELD] ${FFFFFF}%d\n{00FF00}[BANKGUTHABEN] ${FFFFFF}%d\n\n{FF0000}[SKILLINFO]\n{00FF00}[SKILL] {FFFFFF}%d/10", string, SpielerInfo[playerid][pMoney], SpielerInfo[playerid][pBankMoney], SpielerInfo[playerid][pSkill]);
		format(string, sizeof(string), "%s\n{00FF00}[LEVEL] {FFFFFF}%d\n{00FF00}[SPIELZEIT] {FFFFFF}%d {00FF00}Tage {FFFFFF}%d:%d:%d {00FF00}Stunden", string, SpielerInfo[playerid][pLevel], SpielerInfo[playerid][pPlayerTimeDay], SpielerInfo[playerid][pPlayerTimeHour], SpielerInfo[playerid][pPlayerTimeMin], SpielerInfo[playerid][pPlayerTimeSec]);
		format(string, sizeof(string), "%s\n[ADMINRANG] {FFFFFF}%d", string, SpielerInfo[playerid][pAdmin]);
	}

	strcat(string, string, sizeof(string));
	ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, "{FF0000}Bloodz {FFFFFF}n {00FF00}Cripz {FFFFFF}- {FFFF00}Stats", string, "SchlieЯen", "");
	return 1;
}
Reply
#6

Remove "strcat(string, string, sizeof(string));".
Reply
#7

-.- thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)