Problem error
#1

I,have this error:
PHP код:
error 075input line too long (after substitutions
This code gives the error:
PHP код:
format(stringsizeof(string),"{00C0FF}%s(%d) {FFFFFF}- дсиаис щмк\n\n\r\r {00FF00}Level: {FF0000}%d  {00FF00}Kills: {FF0000}%d {00FF00}Points: {FF0000}%d\n\n\r\r {00FF00}Health: {FF0000}%.1f {00FF00}Armour: {FF0000}%.1f {00FF00}Money: {FF0000}%d\n\n\r\r {00FF00}Game Time: %d:%d:%d",GetName(playerid),playerid,PlayerInfo[playerid][Level],PlayerInfo[playerid][Kills],PlayerInfo[playerid][Points],health,Armour,GetPlayerMoneyEx(playerid),GetPVarInt(playerid,"HoursPlayed"),GetPVarInt(playerid,"MinutesPlayed"),GetPVarInt(playerid,"SecondsPlayed"));
ShowPlayerDialog(playerid,11,DIALOG_STYLE_MSGBOX,"{7FFF00}Stats System:",string,"ъцевд йщрд","ца"); 
Reply
#2

The format line is too long, split it up into multiple lines.
Reply
#3

How to do it?
Reply
#4

Using strcat.

Here's an example from my statistics command off an old gamemode of mine:

pawn Код:
format(string, sizeof(string), "{0FA0D1}Name: {FFFFFF}%s (ID: %d)\n{0FA0D1}VIP Rank: {FFFFFF}%s (%d)\n{0FA0D1}Money: {FFFFFF}$%d", pName(playerid), playerid, VIPName, PVar[playerid][VIPLevel], PVar[playerid][pMoney]);
        strcat(holder, string, sizeof(holder));
//Format another string here, and then use strcat(holder, string, sizeof(holder) again.
        ShowPlayerDialog(playerid, STATS, DIALOG_STYLE_MSGBOX, "{0FA0D1}Los Santos Turf War: Statistics", holder, "Hide", "");
Reply
#5

pawn Код:
format(string, sizeof(string),"{00C0FF}%s(%d) {FFFFFF}- дсиаис щмк\n\n\r\r {00FF00}Level: {FF0000}%d  {00FF00}Kills: {FF0000}%d {00FF00}Points: {FF0000}%d\n\n\r\r {00FF00}Health: {FF0000}%.1f {00FF00}Armour: {FF0000}%.1f {00FF00}Money: {FF0000}%d\n\n\r\r {00FF00}Game Time: %d:%d:%d",
    GetName(playerid),playerid,PlayerInfo[playerid][Level],PlayerInfo[playerid][Kills],PlayerInfo[playerid][Points],health,Armour,GetPlayerMoneyEx(playerid),GetPVarInt(playerid,"HoursPlayed"),GetPVarInt(playerid,"MinutesPlayed"),GetPVarInt(playerid,"SecondsPlayed"));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)