GetCountryName
public CountryCode GetCountryName(string Code);
Parameter
Value | Type | Description |
---|---|---|
code | string | Country code of user/guild transmitted from server to client |
Description
The country code consisting of two alphabet characters stored in server as ISO 3166-1 alpha-2 type is converted to CountryCode to be used in the SDK.
- You can check the country codes in ISO 3166-1 alpha-2 format and CountryCode in CountryCode documentation.
To use CountryCode, add the following syntax to the top of the script:
using BackEnd.GlobalSupport;
Example
CountryCodeDic.GetCountryName("KR");
CountryCode country = CountryCodeDic.GetCountryName("KR");
Backend.BMember.UpdateCountryCode(country);
Return cases
Success cases
When the change is successful return : CountryCode.country code (ex : KR > CountryCode.SouthKorea)
Error cases
When a non-existent country code is entered return : CountryCode.NONE