dini2 doesn't write
#1

Hi, I have an inventory system and I used to save the items separately in a folder called "Inventories", but now I decided to save the inventory into player's file instead of keeping them separately. The problem is that it doesn't save items that are in slots above 11. I use dini2. Is this some kind of limit that doesn't me write that? It stops writing at the 65th line, but the 65th line is blank. It prints all the items without any problems, all the 20 slots (0-19). Here's the inventory saving code if it helps:
Code:
#define MAX_INVENTORY 20

for (new i; i < MAX_INVENTORY; i++)
{
    format(itemline, sizeof(itemline), "Item%d", i);
    format(string, sizeof(string), "%s|%d", InventoryInfo[playerid][i][ItemName], InventoryInfo[playerid][i][ItemCount]);
    dini_Set(GetAccountFile(playerid), itemline, string);
}
This is what the file looks like:
Line 0-40: https://gyazo.com/0a9b8eb3e970273e2913c6f8aaa3f01d
Line 41-65: https://gyazo.com/2103401a1b18f60183064669ad927f7e

EDIT: Found the problem, INI_MAX_FIELDS in the include was 64, I made it bigger.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)