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

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;
}
Reply
#2

Yep,sometimes they are just too long. The only way is to use StrCat.

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

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]
);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)