Page 1 of 2

Tradepost Eror

Posted: 10 Feb 2020, 10:33
by ld3FIk5
Hi,

we have problems with our tradepost. If you want to sell some bigger ammount of something it sometimes gives an error message like "There was an error. Please contact your admin."
The items the player wanted to sell are away but the coins was not payed.

Sidequestion: Is there a error log for the admins to check what the player wanted to sell?

Greetings ld3FIk5

Re: Tradepost Eror

Posted: 11 Feb 2020, 09:37
by Chris
Hi,
sorry but this is too vague to be looked into.
If you're receiving errors please document them as detailed as possible. I.e. who tried to buy/sell what amount of which item through which function/tab at what exact time on which ServerID. We can use this info to track down errors in the logfiles.

Sidequestion: Is there a error log for the admins to check what the player wanted to sell?
No

Re: Tradepost Eror

Posted: 11 Feb 2020, 14:27
by ld3FIk5
OK fine. I will give this order to my players through our discord.

Re: Tradepost Eror

Posted: 17 Feb 2020, 12:21
by ld3FIk5
Hi Chris,

yesterday we got an error.
Time: 16.02. 10:15 pm german time.
Objects: 64x Gold rings quality 61+
Server ID: 4442

Items were deleted but no money was payed.

It seams, the error mostly occurs on selling bigger ammount of unstackable items.

Re: Tradepost Eror

Posted: 17 Feb 2020, 18:53
by Nyuton
Hey,
thanks for the info
I think it's indeed because these items aren't stacked, so it tries to handle too many different inventory operations in one go, and some of them fail.
I'll have to think about rewriting the inventory operations to be executed in batches of 10 with a slight delay in between.

Will need some time to test and fix this.
In the meantime I can only recommend to sell unstackable items in smaller batches. That should be safer.

Re: Tradepost Eror

Posted: 19 Feb 2020, 05:42
by ld3FIk5
We have a new issue.
It was now minimum two times.

The mod does not give the change and delete the whole money at the inventory of the player.
Yesterday 18.02. about 11:15h pm.
Trade of 3 building kits one by one by the player.
Player had 55 goldcoins before in inventory. After the third all were deleted by the trading mod.
Is there a possibility to check that at the database?

Re: Tradepost Eror

Posted: 19 Feb 2020, 21:22
by Nyuton
Hi,
can you upload the server logfile from 18.02.?
The web log suggests that the player left the trading post during transfer, which caused the transaction to fail. But it would be clearly visible in the yo server logfile I think.

I'll try to improve logging in the next update and make transaction logs (including failed ones) visible for GMs.

Re: Tradepost Eror

Posted: 20 Feb 2020, 13:34
by ld3FIk5
I safed the part of the log between 23:00 and 23:30 at my webspace because it's to big for the forum and pastebin,

http://inselcatan.de/dl/log.txt

Re: Tradepost Eror

Posted: 20 Feb 2020, 13:41
by ld3FIk5
This morning we had many http 500 errors but it seems there was no loss of trade or coins.

Re: Tradepost Eror

Posted: 21 Feb 2020, 00:27
by Nyuton
so according to your log, the player traded some regional items at 23:13 and then gets respawned to sync the inventory:
ECHO 2020-02-18 23:13:32.178 {01} <FTTPTransfer::respawnPlayer> [29131178] FTTP | Respawning CharID 8 to sync inventory after regional or featured items were inserted

The respawn happens at position -217.8 590.43 1006.73
INFO 2020-02-18 23:13:32.656 {02} <spawnPlayer> [29131375] Spawned player 26089 Player at -217.8 590.43 1006.73
But the trading post is located at -286.11 561.521 1005. Thats roughly 15-20 tiles away. So the transaction is supposed to fail in this case.

Then the player moves back to the trading post.
ECHO 2020-02-18 23:14:16.096 {02} <NyuTrigger::playerEnter> [29151096] TTmod | Character ID 8 has entered the trigger at position -286.11 561.521 1005
...
ECHO 2020-02-18 23:14:16.098 {01} <Player::FTTP_activateTradepost> [29151098] FTTP | CharID 8 is ready to trade at TradepostID 43
This triggers the failed transaction to (partially) execute.

I can probably mitigate the item loss after failed transactions in the next update. But the root cause of this is people leaving the tp during trading.