Jessecar96 / SteamBot

Automated bot software for interacting with Steam Trade
http://scrap.tf
MIT License
1.33k stars 910 forks source link

Update to Generic Inventory to prevent casting errors. #1114

Closed ghost closed 6 years ago

ghost commented 6 years ago

I was implementing my own changes to the Generic Inventory when I kept running into a casting error. I managed to troubleshoot the issue and found that non-marketable items would return a market_fee_app_id of null which would cause errors when converting it to "long". The best solution for this was to set the market_fee to 0 when the item was not marketable. This issue could be fixed in many other ways such as seeing if the item is actually marketable but this is the fix I came up with.

BlueRaja commented 6 years ago

Looks like a safe change, I can't imagine this breaking anything.