Quote:
Originally Posted by JoaoGhost
Peguei no console isso:
PHP Code:
warning: Strings without a length are deprecated, please add a destination size.
warning: String buffer overflow.
e dps
--- Server Shutting Down.
|
Quote:
Originally Posted by k2bi
Nгo testei manim. Vк ae se funciona
PHP Code:
stock SaveInventory(playerid)
{
new gItemList[200];
new filename[48], str[64];
GetPlayerName(playerid,filename, 25);
format(str, 64,"Inventory/%s.inv",filename);
new File:file=fopen(str, io_append);
for(new item;item<MAX_INV_ITEMS;item++)
{
if(!strlen(_GetItemNamePVar(playerid,item))||!_GetItemAmountPVar(playerid,item))continue;
format(gItemList,sizeof(gItemList),"%s%s\n%d\n",gItemList,_GetItemNamePVar(playerid,item),_GetItemAmountPVar(playerid,item));
}
fwrite(file, gItemList);
fclose(file);
}
|
opa entгo, testei sem usar o salvamento do inventбrio mas caiu do mesmo jeito. nгo faзo ideia do que pode ser