Skip to main content
Version: SDK-5.9.6

ContributeGoodsV3

public BackendReturnObject ContributeGoodsV3(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 ContributeGoodsV4 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 of contribution. Only positive numbers are allowed.

Description

Contributes currency to the currently joined guild.

In BACKND, 10 types of goods can be contributed, and a total amount of contributed goods can be set when creating a guild.
These types are named goods1, goods2, goods3 ⋯ goods10.

Example

Synchronous

Backend.Guild.ContributeGoodsV3(goodsType.goods1, 20);

Asynchronous

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

SendQueue

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

Return cases

Success cases

When the contribution is successful
statusCode : 204
message : Success

Error cases

When the contributed goodsType exceeds the goodsCount
statusCode : 400
errorCode : BadParameterException
message : bad goodsType, Invalid goodsType

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

When a user who has not joined a guild calls the method
statusCode : 412
errorCode : PreconditionFailed
message : notGuildMember prerequisites are not met.