He-Man Posted November 15, 2015 Report Share Posted November 15, 2015 (edited) Hi,there is a Bug when buying Vehicles from Trader.When buying a Vehicle, the following code will push back the AI-Items to the DB:_objHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _slot];["AI_ITEMS", _objHiveKey, EPOCH_expiresAIdata, [_itemClasses, _itemQtys]] call EPOCH_fnc_server_hiveSETEX;Now it happens, that NOT the slot from the Trader will be pushed back. Instead, the Vehicle Slot will be pushed back. So the Trader becomes a duplicate with the vehicles slot in the DB.When no other trade was made after this, after a restart the Vehicle will stay on the Map and also in the trader inventory (because the Vehicle was only deleted in the duplicate).I can't retrace, why this happen. The code seems okay.To fix it, you only have to change all _slot in the EPOCH_server_makeNPCTrade.sqf into _traderslot.That's all :) Edited November 15, 2015 by He-Man Link to comment Share on other sites More sharing options...
vbawol Posted November 16, 2015 Report Share Posted November 16, 2015 (edited) Thanks for the report, experimental (0.3.5) should have this fixed already as I did recently notice this also.https://github.com/EpochModTeam/Epoch/blob/experimental/Sources/epoch_server/compile/epoch_trading/EPOCH_server_makeNPCTrade.sqf#L64 Edited November 16, 2015 by vbawol KPABATOK 1 Link to comment Share on other sites More sharing options...
He-Man Posted November 16, 2015 Author Report Share Posted November 16, 2015 (edited) _objHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _slot];_slot looks same as in 0.3.4... Or has been fixed by another way?!We will see ;) Edited November 16, 2015 by He-Man Link to comment Share on other sites More sharing options...
KPABATOK Posted November 17, 2015 Report Share Posted November 17, 2015 Finally a fix. Hated this bug a lot :D Buy a car from trader, after restart it's back at trader. Or sell a car to trader, after restart it disappears from it. God knows where. Link to comment Share on other sites More sharing options...
vbawol Posted November 17, 2015 Report Share Posted November 17, 2015 _objHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _slot];_slot looks same as in 0.3.4... Or has been fixed by another way?!We will see ;)If you compare them you will see the vehicle slot now uses its own variable (_vehSlot), the problem was that _slot was used for traders and then again incorrectly used for the vehicle slot. Link to comment Share on other sites More sharing options...
He-Man Posted November 18, 2015 Author Report Share Posted November 18, 2015 (edited) Ah, thanks for this Information! Edit:Doublechecked and found, that _vehSlot is already used in 0.3.4!0.3.4:_vehSlot = _vehicle getVariable["VEHICLE_SLOT", "ABORT"]; Because that I wrote, that for me the code seems ok.I have no idea, where the codes becomes the wrong _slot from.But again: _slot renaming into _traderslot seems to work. Edited November 18, 2015 by He-Man Link to comment Share on other sites More sharing options...
He-Man Posted March 31, 2016 Author Report Share Posted March 31, 2016 Deleted... Have to double check first Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now