Errors! help needed "input line too long"
#4

Quote:
Originally Posted by Jeffry
Посмотреть сообщение
As the error says, the input in your code is too long.
Simply split up the format:

pawn Код:
new string[512], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "{FFFFFF}* Account information for nick '{00FF00}%s{FFFFFF}' are following:\n\n1). Account Password: {FF0000}Not Available (Disabled By Staff){FFFFFF}\n", pname);
format(string, sizeof(string), "%s2). Admin Level: '{00FF00}%d{FFFFFF}'\n3). Vip Level: '{00FF00}%d{FFFFFF}'\n4). Money: '{00FF00}$%d{FFFFFF}'\n", string, pInfo[playerid][Adminlevel], pInfo[playerid][VIPlevel], pInfo[playerid][Money]);
format(string, sizeof(string), "%s5). Score: '{00FF00}%d{FFFFFF}'\n6). Kills: '{00FF00}%d{FFFFFF}'\n7). Deaths: '{00FF00}%d{FFFFFF}'", string, pInfo[playerid][Scores], pInfo[playerid][Kills], pInfo[playerid][Deaths]);
ShowPlayerDialog(playerid, account_info, DIALOG_STYLE_MSGBOX, "{00FF00}Account Info", string,"Close","");
This will not work. The string variable will have the last formated string as value.

You must use https://sampwiki.blast.hk/wiki/Strcat to make a huge formated string.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)