error 075: input line too long (after substitutions) - 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: error 075: input line too long (after substitutions) (
/showthread.php?tid=414646)
error 075: input line too long (after substitutions) - Patrick - 10.02.2013
Hello guys i tried to higher the integer value but it still not working and giving me still 2 errors, anything that can i do?
pawn Код:
error 075: input line too long (after substitutions)
error 027: invalid character constant
stats command
pawn Код:
dcmd_stats(playerid,params[])
{
#pragma unused params
new string[256], JailTimeString[256], ArmyString[256], CIAString[256], RegularString[256];
if(CanUseArmy[playerid] == 1337)
{
format(ArmyString, sizeof(ArmyString), "Yes");
}
else
{
format(ArmyString, sizeof(ArmyString), "No");
}
if(CanUseCIA[playerid] == 1337)
{
format(CIAString, sizeof(CIAString), "Yes");
}
else
{
format(CIAString, sizeof(CIAString), "No");
}
if(IsRegularPlayer[playerid] == 1337)
{
format(RegularString, sizeof(RegularString), "Yes");
}
else
{
format(RegularString, sizeof(RegularString), "No");
}
if(JailTime[playerid] >= 1)
{
format(JailTimeString, sizeof(JailTimeString), "%d", JailTime[playerid]);
}
else
{
//Do Nothing
}
format(string, sizeof(string), "Army: %s\nCIA: %s\nRegular Player: %s\nAdmin Level:%d\nJailtime: %d\nWanted Level: %d\nC4 Packs: %d\nRopes: %d\nCash: $%d\nBankCash: $%d\nRob Level: %d\nTerrorist Level: %d\nHeroin Injections: %d\Weed Grams: %d", ArmyString, CIAString, RegularString, AdminLevel[playerid], JailTimeString, GetPlayerWantedLevel(playerid), HasC4[playerid], HasRope[playerid], GetPlayerMoney(playerid), BankCash[playerid], RobSkill[playerid], TerroristSkill[playerid], HasHeroin[playerid], HasWeed[playerid]);
ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Status Information", string, "Close", "");
return 1;
}
Re: error 075: input line too long (after substitutions) -
dusk - 10.02.2013
Yep,sometimes they are just too long. The only way is to use StrCat.
https://sampwiki.blast.hk/wiki/Strcat
Re: error 075: input line too long (after substitutions) -
ryansheilds - 10.02.2013
Try replacing the formatted string at the end with:
pawn Код:
format(string, sizeof(string), "Army: %s\n\
CIA: %s\n\
Regular Player: %s\n\
Admin Level:%d\n\
Jailtime: %d\n\
Wanted Level: %d\n\
C4 Packs: %d\n\
Ropes: %d\n\
Cash: $%d\n\
BankCash: $%d\n\
Rob Level: %d\n\
Terrorist Level: %d\n\
Heroin Injections: %d\n\
Weed Grams: %d",
ArmyString,
CIAString,
RegularString,
AdminLevel[playerid],
JailTimeString,
GetPlayerWantedLevel(playerid),
HasC4[playerid],
HasRope[playerid],
GetPlayerMoney(playerid),
BankCash[playerid],
RobSkill[playerid],
TerroristSkill[playerid],
HasHeroin[playerid],
HasWeed[playerid]
);