0

I'm using CSharpTradeOffers library (GitHub)

So there are

SendTradeOfferWithLink (CSharpTradeOffers/Trading/EconServiceHandler.cs) and SendOfferResponse (CSharpTradeOffers/Trading/Data Classes/SendOfferResponse.cs) functions.

Basically I have this code:

TradeOffer offer = new TradeOffer();
offer.Me.Assets.Add(csgoInventory.Items.First().Value.Items.First().ToCEconAsset(730));
offerHandler.SendTradeOfferWithLink(steamid, token, msg, "1", offer, _account.AuthContainer);

But if trade offer was failed because of error — I can't see anything in console. Can anyone explain me, please, how can I output trade offer error code (e.g. this) to console if trade offer was not made? There's even JsonProperty("strError"), but I can't understand how can I parse this error string to console.

Hopefully, someone understood my language :D Thanks in advance

Danny
  • 31
  • 1
  • 3

1 Answers1

0

SendTradeOfferWithLink returns a SendOfferResponse which has the Error that you can write to the console :

TradeOffer offer = new TradeOffer();
offer.Me.Assets.Add(csgoInventory.Items.First().Value.Items.First().ToCEconAsset(730));
var response = offerHandler.SendTradeOfferWithLink(steamid, token, msg, "1", offer, _account.AuthContainer);

Console.WriteLine(response.Error);

*If that error message is not in the desired format, update your question with that error.

Xiaoy312
  • 14,292
  • 1
  • 32
  • 44