Skip to main content
Version: SDK-6.0.0

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

ValueTypeDescriptiondefault
guildNamestringGuild name-
goodsCountintNumber of guild goods to be used(1 - 10)(Cannot be changed after the guild has been created)-
paramParam(Optional) Guild metadata-

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.
Note on GetPolicy method's migration to GetPolicy
  • The guild name must be between 2 - 16 characters and can contain Korean and alphanumeric characters; however, using special characters is prohibited. Furthermore, guild names cannot start with a number. Using spaces is allowed, but consecutive spaces are prohibited. Starting or ending the guild name with a space is also prohibited.
  • The number of guild goods types can only be defined at the point of creation; increasing or decreasing it is not available afterward.
  • The desired information can be stored in the metadata, and it is possible to add/modify meta information through ModifyGuild(param).
  • The country code can be added/modified by the guild master using UpdateCountryCode after the guild is created.
  • For more information on CountryCode, refer to this link.
  • Only countries that exist in the users' country code can be registered as the guild's country code. Guild country codes that are not a part of the users' country code pool are not displayed on the console.
  • 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
    message : Success

    Error cases

    When the goodsCount is more than 10
    statusCode : 400
    errorCode : BadParameterException
    message : bad goodsCount is too big, The goodsCount is too big

    When the goodsCount is 0 or lower
    statusCode : 400
    errorCode : UndefinedParameterException
    message : undefined goodsCount must be more then 1, Cannot confirm that goodsCount is 1 or above

    When a user who does not meet the console setting conditions tries to create a guild
    statusCode : 403
    errorCode : ForbiddenError
    message : Forbidden createGuild, Forbidden createGuild

    When there is an attempt to create a guild with a duplicated guild name
    statusCode : 409
    errorCode : DuplicatedParameterException
    message : Duplicated guildName, Duplicated guildName

    When the guild name conditions are not met
    statusCode : 412
    errorCode : PreconditionFailed
    message : guildName prerequisites are not met.

    When the user is already in a guild
    statusCode : 412
    errorCode : PreconditionFailed
    message : JoinedGamer prerequisites are not met.