Hello, I want to make an inventory system but I dont know how should I save it. I am going to use y_ini and I think I can use strings to save it. Is it logical to do it like this?;
{} represents an item table. first thing in this table is item id, second thing is item quantity. I will define item ids one by one. when you try to add an item to player, it will check this string and if item id exists, it will add 1 to specified item table's second argument. if item id doesn't exists then it will add new item table with 1 quantity. it goes same way with removing items.
I made this logic but I dont know how to do it in pawn. should I use sscanf for strings or what?
Also, would it be efficient to get whole string every time to add new item?
Code:
"{13,2},{24,5},{12,7}"
I made this logic but I dont know how to do it in pawn. should I use sscanf for strings or what?
Also, would it be efficient to get whole string every time to add new item?