question

runbycoffee avatar image
runbycoffee asked

TradeInventoryItemIsNotTradable

So, we use following code to trade items, all the player PlayFabID*s and Item instance ID' are correct

  void GiveItemTo(string person_to_send, string ItemInstanceID)
  {
  OpenTradeRequest request = new OpenTradeRequest();

  List<string> items = new List<string>();
  items.Add(ItemInstanceID);

  List<string> persons_in_trade = new List<string>();
  persons_in_trade.Add(person_to_send);
  persons_in_trade.Add(my_own_id);

  request.OfferedInventoryInstanceIds = items;
  request.AllowedPlayerIds = persons_in_trade;
  PlayFabClientAPI.OpenTrade(requesti, Onnistunut, OnPlayFabError);
  }

  public void Onnistunut (OpenTradeResponse result)
  {

  }

  void OnPlayFabError(PlayFabError error)
  {
  Debug.Log(error.ErrorMessage);
  Debug.Log(error.ErrorDetails);
  Debug.Log(error.Error);
  }

If interest our app is called Oppilaakso (in case you need to check something). All items in catalog are set as "Is tradable".

What could be the problem?

Trading
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

You have to explicitly make items tradable in your game catalog. Select "is tradable" on the catalog entry and click save. This is to prevent players cheating games that don't have tradable items, or where they want it to be restricted to only some items.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

runbycoffee avatar image runbycoffee commented ·

As mentioned, all items in our game catalog are set as "Is tradable". Just double checked by downloading JSON file and searched string "IsTradable": true which returned 62 results, matches total amount of items we have in our game (only) catalog.

0 Likes 0 ·
brendan avatar image brendan runbycoffee commented ·

My apologies - I was looking at the code, and literally the only place that error can be returned is if IsTradable is not set on the inventory item. Is it possible you're trying to make a trade using an item instance which was created before the "is tradable" flag was set on the ItemId in the catalog? That would explain why the specific item in question cannot be traded. If that's not the issue, can you provide the Title ID, PlayFab ID of the user, and the Item Instance ID, so that we can have a look?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.