Как можно улучшить выполнение форматирование? Ибо не очень нравится, что так много строк
PHP код:
static const
fmt_str0[] = "UPDATE `accounts` SET `inv_slot` = "\
"'%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d', "\
"`inv_quantity` = "\
"'%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d' "\
"WHERE `login` = '%s'"
;
new str0[sizeof (fmt_str0) + (((6 * 15) * 2) + MAX_PLAYER_NAME)];
format(
str0,
sizeof (str0),
fmt_str0,
PlayerInfo[playerid][pInventory_Slot][0],
PlayerInfo[playerid][pInventory_Slot][1],
PlayerInfo[playerid][pInventory_Slot][2],
PlayerInfo[playerid][pInventory_Slot][3],
PlayerInfo[playerid][pInventory_Slot][4],
PlayerInfo[playerid][pInventory_Slot][5],
PlayerInfo[playerid][pInventory_Slot][6],
PlayerInfo[playerid][pInventory_Slot][7],
PlayerInfo[playerid][pInventory_Slot][8],
PlayerInfo[playerid][pInventory_Slot][9],
PlayerInfo[playerid][pInventory_Slot][10],
PlayerInfo[playerid][pInventory_Slot][11],
PlayerInfo[playerid][pInventory_Slot][12],
PlayerInfo[playerid][pInventory_Slot][13],
PlayerInfo[playerid][pInventory_Slot][14],
PlayerInfo[playerid][pInventory_Quantity][0],
PlayerInfo[playerid][pInventory_Quantity][1],
PlayerInfo[playerid][pInventory_Quantity][2],
PlayerInfo[playerid][pInventory_Quantity][3],
PlayerInfo[playerid][pInventory_Quantity][4],
PlayerInfo[playerid][pInventory_Quantity][5],
PlayerInfo[playerid][pInventory_Quantity][6],
PlayerInfo[playerid][pInventory_Quantity][7],
PlayerInfo[playerid][pInventory_Quantity][8],
PlayerInfo[playerid][pInventory_Quantity][9],
PlayerInfo[playerid][pInventory_Quantity][10],
PlayerInfo[playerid][pInventory_Quantity][11],
PlayerInfo[playerid][pInventory_Quantity][12],
PlayerInfo[playerid][pInventory_Quantity][13],
PlayerInfo[playerid][pInventory_Quantity][14],
PlayerInfo[playerid][pLogin]
);