Skip to main content
Version: SDK-5.11.4

UseGoodsV3

public BackendReturnObject UseGoodsV3(goodsType type, int amount);

Issue of ranking settlement failure upon calling the method

When utilizing guild rankings using goods information, calling this function during the ranking settlement time may abnormally terminate the process.
Therefore, please use the UseGoodsV4 function that restricts calls between 4 - 5 am when utilizing guild rankings using goods information.

Parameters

ValueTypeDescription
typegoodsType(enum)Type of currency to contribute. goodsType.goodsN(N: 1 - 10)
amountintAmount to be used. Only negative numbers are allowed.

Description

Uses the currency of the guild's goodsType.

Example

Synchronous

Backend.Guild.UseGoodsV3(goodsType.goods1, -20);

Asynchronous

Backend.Guild.UseGoodsV3(goodsType.goods1, -10, (callback) => 
{
// Post-process
});

SendQueue

SendQueue.Enqueue(Backend.Guild.UseGoodsV3, goodsType.goods1, -10, (callback) => {
// Post-process
});

Return cases

Success cases

When used
statusCode : 204
message : Success

Error cases

When a guild member who is not the master attempts to use
statusCode : 403
errorCode : ForbiddenException
message : Forbidden useGoods, Cannot use goods

When the amount is a positive number
statusCode : 412
errorCode : PreconditionFailed
message : type prerequisites are not met.

When the used amount is larger than the owned amount
statusCode : 412
errorCode : PreconditionFailed
message : inadequateAmount prerequisites are not met.

When a person not in the guild attempts to use
statusCode : 412
errorCode : PreconditionFailed
message : notGuildMember prerequisites are not met.