CreateGuildV3
public BackendReturnObject CreateGuildV3(string guildName, int goodsCount);
public BackendReturnObject CreateGuildV3(string guildName, int goodsCount, CountryCode countryCode);
public BackendReturnObject CreateGuildV3(string guildName, int goodsCount, Param param);
public BackendReturnObject CreateGuildV3(string guildName, int goodsCount, Param param, CountryCode countryCode);
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 information | 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
Backend.Guild.CreateGuildV3("guildName", 2);
Backend.Guild.CreateGuildV3("guildName", 2, CountryCode.SouthKorea);
// Enter the metadata you want in the param(optional)
Param param = new Param();
param.Add("level",0);
param.Add("buf",1);
Backend.Guild.CreateGuildV3("guildName", 2, param);
Backend.Guild.CreateGuildV3("guildName", 2, param, CountryCode.SouthKorea);
Asynchronous
// If the metadata is missing
Backend.Guild.CreateGuildV3("guildName", 2, (callback) =>
{
// Post-process
});
Backend.Guild.CreateGuildV3("guildName", 2, CountryCode.SouthKorea, (callback) =>
{
// Post-process
});
// If the metadata exists
Param param = new Param();
param.Add("level",0);
param.Add("buf",1);
Backend.Guild.CreateGuildV3("guildName", 2, param, (callback) =>
{
// Post-process
});
Backend.Guild.CreateGuildV3("guildName", 2, param, CountryCode.SouthKorea, (callback) =>
{
// Post-process
});
SendQueue
//If the metadata is missing
SendQueue.Enqueue(Backend.Guild.CreateGuildV3("guildName", 2, (callback) =>
{
// Post-process
});
Backend.Guild.CreateGuildV3("guildName", 2, CountryCode.SouthKorea, (callback) =>
{
// Post-process
});
//If the metadata exists
Param param = new Param();
param.Add("level",0);
param.Add("buf",1);
Backend.Guild.CreateGuildV3("guildName", 2, param, (callback) =>
{
// Post-process
});
Backend.Guild.CreateGuildV3("guildName", 2, param, CountryCode.SouthKorea, (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