Jump to content
  • 0

Inventory wiped on access


Nekuan

Question

Hey there,

so i created a new trader for my server and the trader itself works just fine, besides the fact that some items aren't being shown properly with pictures but instead in brackets, they still work though.

But after uploading it to the server i soon realized that every inventory is being completely wiped on access meaning:
I unlock a car or safe and thats when the inventory is being wiped.

I checked the safe/car via DB before and everything was in there.

 

I have absolutely no idea why this is happening so I'm asking you guys.

 

Things we changed:

Creating the trader itself (Database, server_traders.sqf and so on)

Creating a marker on the map,

Creating a new safezone for the trader using safezone commander

Removing ammo from the new vehicles we added to the trader using the script from J3T (http://opendayz.net/threads/release-remove-weapons-ammunition-thermal-from-vehicle-epoch-version.18044/)

 

Any ideas are much appreciated!

 

Regards

Nekuan

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

Hey there,

so i created a new trader for my server and the trader itself works just fine, besides the fact that some items aren't being shown properly with pictures but instead in brackets, they still work though.

But after uploading it to the server i soon realized that every inventory is being completely wiped on access meaning:

I unlock a car or safe and thats when the inventory is being wiped.

I checked the safe/car via DB before and everything was in there.

 

I have absolutely no idea why this is happening so I'm asking you guys.

 

Things we changed:

Creating the trader itself (Database, server_traders.sqf and so on)

Creating a marker on the map,

Creating a new safezone for the trader using safezone commander

Removing ammo from the new vehicles we added to the trader using the script from J3T (http://opendayz.net/threads/release-remove-weapons-ammunition-thermal-from-vehicle-epoch-version.18044/)

 

Any ideas are much appreciated!

 

Regards

Nekuan

 

the brackets might overwrite anything in the inventory

Link to comment
Share on other sites

  • 0
INSERT INTO `traders_data` (`id`, `item`, `qty`, `buy`, `sell`, `order`, `tid`, `afile`) VALUES
(7564, '["AH64D_EP1",1]', 13, '[2,"ItemRuby",1]', '[1,"ItemTopaz",1]', 0, 703, 'trade_any_vehicle_old'),
(7563, '["10Rnd_127x99_m107",1]', 15, '[1,"ItemTopaz",1]', '[1,"ItemTopaz",1]', 0, 704, 'trade_items_old'),
(7562, '["ArmoredSUV_PMC_DZE",1]', 15, '[2,"ItemRuby",1]', '[1,"ItemTopaz",1]', 0, 702, 'trade_any_vehicle_old'),
(7561, '["M107_DZ",1]', 15, '[1,"ItemRuby",1]', '[1,"ItemTopaz",1]', 0, 701, 'trade_weapons_old');

id's were NULL, those are just extracts from the SQL as i can't find the actual "Inserts" right now.

The m107 mag is actually the only one which is properly displayed

Link to comment
Share on other sites

  • 0

INSERT INTO `traders_data` (`id`, `item`, `qty`, `buy`, `sell`, `order`, `tid`, `afile`) VALUES

(7564, '["AH64D_EP1",2]', 13, '[2,"ItemRuby",1]', '[1,"ItemTopaz",1]', 0, 703, 'trade_any_vehicle_old'),

(7563, '["10Rnd_127x99_m107",1]', 15, '[1,"ItemTopaz",1]', '[1,"ItemTopaz",1]', 0, 704, 'trade_items_old'),
(7562, '["ArmoredSUV_PMC_DZE",2]', 15, '[2,"ItemRuby",1]', '[1,"ItemTopaz",1]', 0, 702, 'trade_any_vehicle_old'),

(7561, '["M107_DZ",3]', 15, '[1,"ItemRuby",1]', '[1,"ItemTopaz",1]', 0, 701, 'trade_weapons_old');

 

I changed the id number: '["Classname","ID NUMBER"]'

  • Weapons = 3
  • Vehicles and backpacks = 2
  • Magazines = 1
Link to comment
Share on other sites

  • 0

In my experience inventory wipes of players / vehicles etc. are usually from the database failing to be updated for a prolonged period, then when the player logs or the vehicle getting an update from the database the inventory is reset to the empty / reduced inventory value held by the database.

 

May be worth investigating ?

Link to comment
Share on other sites

  • 0

Removing ammo from the new vehicles we added to the trader using the script from J3T (http://opendayz.net/threads/release-remove-weapons-ammunition-thermal-from-vehicle-epoch-version.18044/)

 

The install instructions for that script states to do the change in the following files:

server_monitor.sqf,

server_publishVehicle2.sqf

server_publishVehicle3.sqf

 

Note that it does not state to put it in server_publishVehicle.sqf

 

Is it possible that you put it in where it should not be found? :)

Link to comment
Share on other sites

  • 0

@Darihon: No, if I'd do that the trader wouldn't remove the gemstones after buying something with them.

 

@Glenn: Sadly that isn't the reason :D

 

@axeman: propably worth investigating but, excuse my stupidity, how would i go about that?

 

 

We are starting to completely re-do the implementation of the new trader now trying to find our mistake =/

Link to comment
Share on other sites

  • 0

*sigh* guess we have a thing for stupid mistakes. 

We were 2 people working on the trader so we were sending the files to each other every once in a while and some files must have gotten corrupted by this. 

Re-doing everything with clean files solved our problems but thanks to everyone replying to this thread!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...