You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are orders that do not work (Game.market.deal returns OK, but the resources/credits never exchange). I tested some of these broken IDs one by one, making sure that the terminal had enough energy, there were enough credits, and no other deals were going on that tick.
What I think happened:
I had changed market.yml to sell only 200,000 of each resource instead of 1,000,000 of each resource (and also used admin-utils to wipe and re-spawn NPC Terminals), and the broken orders are all the old 1,000,000 ones, which still show in the in-client market UI and are returned by Game.market.getAllOrders(). Again, Game.market.deal on these orders returns OK but does not successfully complete.
I think the bug stems from the mod code not removing orders if the original terminals don't exist anymore, or some other variation of a dangling/orphan issue.
How I figured it out:
I added a blacklist array to my code that order IDs were added to after attempting them, and suddenly all my rooms were trading again after a few ticks (they swam through all the fake/busted orders). I have it temporarily fixed by filtering for orders <= 200000 amount, since all the 1000000 orders are the broken ones.
Cheers,
The text was updated successfully, but these errors were encountered:
The best fix for now is anytime you change amounts in market.yml and/or delete/re-spawn NPC Terminals, you should run storage.db['market.orders'].clear() in your server CLI and then re-start server. This will make sure all orphan orders get cleaned up and get a set of new orders from the active terminals.
Bug situation:
There are orders that do not work (
Game.market.deal
returnsOK
, but the resources/credits never exchange). I tested some of these broken IDs one by one, making sure that the terminal had enough energy, there were enough credits, and no other deals were going on that tick.What I think happened:
I had changed
market.yml
to sell only 200,000 of each resource instead of 1,000,000 of each resource (and also usedadmin-utils
to wipe and re-spawn NPC Terminals), and the broken orders are all the old 1,000,000 ones, which still show in the in-client market UI and are returned byGame.market.getAllOrders().
Again,Game.market.deal
on these orders returnsOK
but does not successfully complete.I think the bug stems from the mod code not removing orders if the original terminals don't exist anymore, or some other variation of a dangling/orphan issue.
How I figured it out:
I added a
blacklist
array to my code that order IDs were added to after attempting them, and suddenly all my rooms were trading again after a few ticks (they swam through all the fake/busted orders). I have it temporarily fixed by filtering for orders <= 200000 amount, since all the 1000000 orders are the broken ones.Cheers,
The text was updated successfully, but these errors were encountered: