Skip to main content
Version: 5.11.8

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

Error cases

When the contributed goodsType exceeds the goodsCount
statusCode : 400
errorCode : BadParameterException

When the amount is a negative number
statusCode : 412
errorCode : PreconditionFailed

When a user who has not joined a guild calls the method
statusCode : 412
errorCode : PreconditionFailed