Example code in Market.deal is inconsistent with function call
-
The API documentation lists the function (correctly) as:
deal(orderId, amount, [targetRoomName])
However the variable order in the example snip in the API is:
Game.market.deal(orders[i].id, "W1N1", amountToBuy);
Using the format in the example code returned -10 (invalid arguments). Reversing amountToBuy and the room name to match the API worked fine.
-
Fixed.
-
Thanks!