CreateGuild
public BackndReturnObject CreateGuild(string guildName, int goodsCount);
public BackndReturnObject CreateGuild(string guildName, int goodsCount);
public BackndReturnObject CreateGuild(string guildName, int goodsCount, Param param);
public BackndReturnObject CreateGuild(string guildName, int goodsCount, Param param);
Parameters
Value | Type | Description | default |
---|---|---|---|
guildName | string | Guild name | - |
goodsCount | int | Number of guild goods to be used(1 - 10)(Cannot be changed after the guild has been created) | - |
param | Param | (Optional) Guild metadata | - |
countryCode | CountryCode | (Optional) Country data | CountryCode.NONE |
Description
Creates a guild.
- Only members who meet all guild creation conditions registered in BACKND Console can create a guild.
Guild creation conditions will be determined according to the latest value in the designated table and partition under BACKND Console > BACKND Base > Guild Management > Settings. If there is no guild creation condition registered in BACKND Console, any member can create a guild.
Example
Synchronous
// If the metadata is missing
Backnd.Guild.CreateGuild("guildName", 2);
// Enter the metadata you want in the param(optional)
Param param = new Param();
param.Add("level",0);
param.Add("buf",1);
Backnd.Guild.CreateGuild("guildName", 2, param);
Asynchronous
// If the metadata is missing
Backnd.Guild.CreateGuild("guildName", 2, (callback) =>
{
// Post-process
});
// If the metadata exists
Param param = new Param();
param.Add("level",0);
param.Add("buf",1);
Backnd.Guild.CreateGuild("guildName", 2, param, (callback) =>
{
// Post-process
});
Return cases
Success cases
When created successfully
statusCode : 204
Error cases
When the goodsCount is more than 10
statusCode : 400
errorCode : BadParameterException
When the goodsCount is 0 or lower
statusCode : 400
errorCode : UndefinedParameterException
When a user who does not meet the console setting conditions tries to create a guild
statusCode : 403
errorCode : ForbiddenError
When there is an attempt to create a guild with a duplicated guild name
statusCode : 409
errorCode : DuplicatedParameterException
When the guild name conditions are not met
statusCode : 412
errorCode : PreconditionFailed
When the user is already in a guild
statusCode : 412
errorCode : PreconditionFailed