Closed eroticcrow closed 6 years ago
Hello, thanks for the report
Can you try this https://github.com/Ppgtjmad/SimpleShops/commit/31f11ebb1ca747b97c41d54ca9ac11ee496218c0
same~ It does not work. sad >_<
Provide new logs pls with the above addition.
i`m using savingMethod = "extDB";
again :
_inventory params ["_items","_mags","_weapons","_backpacks"];
_items -> addItemCargoGlobal : [[[],[]],[[],[]],[[],[]],[[],[]]]
my DB Inventory value : [[[],[]],[[],[]],[[],[]],[[],[]]]
"DB" will be saved. However, after loading the value from "DB", it can not be saved in my car.
but savingMethod = "Profile"; An item is created inside my vehicle.
" cargonet_01_ammo_f.p3d / 9595 / addItemCargoGlobal : [[[],[]],[[],[]],[[],[]],[[],[]]] " " cargonet_01_ammo_f.p3d / 9595 / addMagazineCargoGlobal : any " " cargonet_01_ammo_f.p3d / 9595 / addWeaponCargoGlobal : any " " cargonet_01_ammo_f.p3d / 9595 / addBackpackCargoGlobal : any " "[KP LIBERATION] [STATS] Source: Server - Time: 60.016 - FPS: 49.6894 - Total units: 11 - Hostile units: 0 - Local units: 10 - Vehicles: 146 - Unitcap: 150"
" cargonet_01_ammo_f.p3d / 9595 / addItemCargoGlobal : [[[""ItemCompass""],[1]],[[],[]],[[],[]],[[],[]]] " "cargonet_01_ammo_f.p3d / 9595 / addMagazineCargoGlobal : any " "cargonet_01_ammo_f.p3d / 9595 / addWeaponCargoGlobal : any " " cargonet_01_ammo_f.p3d / 9595 / addBackpackCargoGlobal : any " "[KP LIBERATION] [STATS] Source: Server - Time: 120.021 - FPS: 50 - Total units: 11 - Hostile units: 0 - Local units: 10 - Vehicles: 146 - Unitcap: 150"
"cargonet_01_ammo_f.p3d / 9595 / addItemCargoGlobal : [[[],[]],[[],[]],[[],[]],[[],[]]] " " cargonet_01_ammo_f.p3d / 9595 / addMagazineCargoGlobal : any " "cargonet_01_ammo_f.p3d / 9595 / addWeaponCargoGlobal : any " "cargonet_01_ammo_f.p3d / 9595 / addBackpackCargoGlobal : any "
"[Mooncrow LOG] : / # 1824854: truck_01_transport_f.p3d / 26 / addItemCargoGlobal : [[],[]] " "[Mooncrow LOG] : / # 1824854: truck_01_transport_f.p3d / 26 / addMagazineCargoGlobal : [[],[]] " "[Mooncrow LOG] : / # 1824854: truck_01_transport_f.p3d / 26 / addWeaponCargoGlobal : [[],[]] " "[Mooncrow LOG] : / # 1824854: truck_01_transport_f.p3d / 26 / addBackpackCargoGlobal : [[],[]] " "[KP LIBERATION] [STATS] Source: Server - Time: 840.16 - FPS: 50 - Total units: 37 - Hostile units: 26 - Local units: 36 - Vehicles: 158 - Unitcap: 150"
DB returned array isn't correct, extDB adds an extra array that you have to get rid of (this is why you have any):
Keep this https://github.com/Ppgtjmad/SimpleShops/commit/31f11ebb1ca747b97c41d54ca9ac11ee496218c0 and add
_inventory = _inventory select 0;
After
_inventory = [2,_query,false] call HG_fnc_asyncCall;
Lemme know if it's fixed.
very very thank!!!!!! 😃
My servers using DB do not store items in vehicle inventory. So I created a LOG and tested it.
fn_setinventory.sqf.. add this. _inventory params ["_items","_mags","_weapons","_backpacks"]; private _text = format ["[Mooncrow LOG] / : %1 / %2 / %3 / addItemCargoGlobal : %4 ", _uid,_vehicle,_plate,_items ];_text remoteExec ["diag_log",2]; private _text = format ["[Mooncrow LOG] : %1 / %2 / %3 / addMagazineCargoGlobal : %4 ", _uid,_vehicle,_plate,_mags ];_text remoteExec ["diag_log",2]; private _text = format ["[Mooncrow LOG] : %1 / %2 / %3 / addWeaponCargoGlobal : %4 ", _uid,_vehicle,_plate,_weapons ];_text remoteExec ["diag_log",2]; private _text = format ["[Mooncrow LOG] : %1 / %2 / %3 / addBackpackCargoGlobal : %4 ", _uid,_vehicle,_plate,_backpacks ];_text remoteExec ["diag_log",2];
profile using log : OK! i can load my item!! "[Mooncrow LOG] / : myid~~+_+ / 6e5d8b80# 1814926: cargonet_01_ammo_f.p3d / 897 / addItemCargoGlobal : [[""NVGoggles_OPFOR"",""NVGoggles"",""opticAMS""],[2,1,1]] " "[Mooncrow LOG] : myid~~++ / 6e5d8b80# 1814926: cargonet_01_ammo_f.p3d / 897 / addMagazineCargoGlobal : [[""RPG32_F"",""Titan_AA"",""KKiv_MagAPFSDS""],[4,8,22]] " "[Mooncrow LOG] : myid~~++ / 6e5d8b80# 1814926: cargonet_01_ammo_f.p3d / 897 / addWeaponCargoGlobal : [[""launch_RPG32_F"",""kio_KKiv2035""],[1,1]] " "[Mooncrow LOG] : myid~~++ / 6e5d8b80# 1814926: cargonet_01_ammo_f.p3d / 897 / addBackpackCargoGlobal : [[],[]] "
BUT~....
DB using log : can't load item. "[Mooncrow LOG] / : myid~~+_+ / 492c8b80# 1814463: cargonet_01_ammo_f.p3d / 9595 / addItemCargoGlobal : [[[[""acc_flashlightpistol""],[1]],[[],[]],[[],[]],[[],[]]]] " "[Mooncrow LOG] : myid~~++ / 492c8b80# 1814463: cargonet_01_ammof.p3d / 9595 / addMagazineCargoGlobal : any " "[Mooncrow LOG] : myid~~++ / 492c8b80# 1814463: cargonet_01_ammof.p3d / 9595 / addWeaponCargoGlobal : any " "[Mooncrow LOG] : myid~~++ / 492c8b80# 1814463: cargonet_01_ammo_f.p3d / 9595 / addBackpackCargoGlobal : any "
I am studying to the DB to get the answer; But it was not easy because I was older.
i`m so sad....plz check. I want to use "DB". thank!