[HELP]Guild + emblem creation issue

11/08/2009 18:52 xylca#1
Hi , It was supposed to be easy to create a guild especially if you were the creator , but in this case , I've encountered this scenario.

I've created a guild name let us say 'Test' after the 'Test' guild was created my guild-creator character doesn't have any rank even a default rank doesn't applied. I am expecting that my character should be the Guild Master , but it did not .. when I checked my character's rank it is blank..

So next one I tried to create a guild emblem but after the creation confirmation the game said 'You have no authority to change the guild emblem'. (That is because I don't have a appropriate rank).

Any idea why in the 1st place I haven't given a default rank? :)

This is the exact picture that happens right after the guild creator tries to create an emblem (This pictures speaks for itself) [Only registered and activated users can see links. Click Here To Register...]

Any helpful comments and suggestions are appreciated
05/25/2010 23:54 silkbotter#2
to be honest, i'm having the same problem.
sorry for bumping an old thread, but this wasn't solved.

i can explain it a little bit better.
1st step after creating a guild:
-guild gets an GUILD_CODE (stored in table GUILD INFO)

2nd step:
-GUILD_CODE + the characters in that guild+the rank(written in table GUILD_CHAR_INFO

3rd step: THE BIG PROBLEM!!!
-GUILD_CODE + all the respective ranks (from 0-9) and the rank name (written in table GUILD_PEERAGE)


the third step doesn't work somehow!
the guild_peerage won't be added, and that's the problem why a char has NO rank after creating a guild.
does anyone have an idea in which SP i can find this procedure?
i need to fix that without importing a fresh database!

i have no idea where to search :/
maybe i'm wrong with my analyzing.
05/26/2010 00:33 daddycool.#3
Take a look at Databases > Character > User Defined Functions

FN_GetGuildCode
FN_GetGuildMasterName
FN_GetGuildPeerageName

Maybe your problem are in one of these functions.

FN_GetGuildCode
Code:
/******************************************************************************
   이  름 : FN_GetGuildCode
   설  명 : character_name을 입력하면 guild_code를 반환한다.
   반환값 : Guild_info.Guild_Code
   예  제 : select dbo.FN_GetGuildCode('jjugi')
   수정내역:
   Ver        Date        Author           Description
   ---------  ----------  ---------------  ------------------------------------
   1.0        2005-05-28  한지욱           1. 초기생성
 ******************************************************************************/
CREATE Function dbo.FN_GetGuildCode (
	@i_character_name varchar(40) 	-- Character_Name
) RETURNS char(10) 
AS
BEGIN
	DECLARE @v_guild_code	char(10)
	IF Len(IsNull(@i_character_name, '')) > 0 
	BEGIN
		SELECT 	@v_guild_code = guild_code
		  FROM 	Guild_Char_Info WITH(NOLOCK)
		 WHERE 	character_name = @i_character_name
	END 
	RETURN ISNULL(@v_guild_code,'')
END
FN_GetGuildMasterName
Code:
/******************************************************************************
   이  름 : dbo.FN_GetGuildMasterName
   설  명 : 길드의 마스터명을 반환한다.
   반환값 : dbo.GUILD_CHAR_INFO.character_name	
   예  제 : SELECT	dbo.FN_GetGuildMasterName('MASTERCODE')
   수정내역:
   Ver        Date        Author			Description
   ---------  ----------  ---------------	------------------------------------
   1.0        2006-05-15  Han JiWook		1. 초기생성
 ******************************************************************************/
CREATE FUNCTION dbo.FN_GetGuildMasterName (
	@i_guild_code	varchar(20)
) RETURNS varchar(50) 
AS
BEGIN
	DECLARE @v_guildmaster_name	varchar(50)
	IF Len(IsNull(@i_guild_code, '')) > 0
	BEGIN
		SELECT 	@v_guildmaster_name = character_name
		FROM 	dbo.GUILD_CHAR_INFO WITH(NOLOCK)
		WHERE 	guild_code	 = @i_guild_code
		AND		peerage_code = 0
	END 
	RETURN 	ISNULL(@v_guildmaster_name, '')
END
FN_GetGuildPeerageName
Code:
/******************************************************************************
   이  름 : FN_GetGuildPeerageName
   설  명 : 길드의 작위명을 반환한다.
   반환값 : GUILD_PEERAGE.peerage_name	
   예  제 : select dbo.FN_GetGuildPeerageName('0506000070', 0)	-- 반환값=길드마스터
   수정내역:
   Ver        Date        Author           Description
   ---------  ----------  ---------------  ------------------------------------
   1.0        2005-07-04  최지환           1. 초기생성
 ******************************************************************************/
CREATE Function dbo.FN_GetGuildPeerageName (
	@i_guild_code	varchar(20),
	@i_peerage_code int 	-- Character_No
) RETURNS varchar(40) 
AS
BEGIN
	DECLARE @v_peerage_name	varchar(40)
	IF Len(IsNull(@i_guild_code, '')) > 0 AND @i_peerage_code IS NOT NULL
	BEGIN
		SELECT 	@v_peerage_name = peerage_name
		FROM 	dbo.GUILD_PEERAGE WITH(NOLOCK)
		WHERE 	guild_code	 = @i_guild_code
		AND		peerage_code = @i_peerage_code
	END 
	RETURN 	ISNULL(@v_peerage_name, '')
END
05/26/2010 05:43 Bullet2l#4
i have the problem once. cos i mess up the guild rank in the database.
05/27/2010 00:17 silkbotter#5
unfortunately nothing with those functions.
as i said.. some entrys aren't being written.
09/21/2017 20:50 asnar002#6
bump . already searched but no solution for this problem :(
09/21/2017 21:30 guesswho-.-#7
7 years old thread x.x

if you're having issues creating a guild then perhaps you removed everything from GUILD_INFO and GUILD_PEERAGE.
Guild info has a default row with MASTERCODE that you cannot remove. if you do this, your guilds will get fked up.
Guild peerage has the info about default guild ranks, so you cant remove it either and they also use the guild_code MASTERCODE. if you removed them, just restore a working backup on a temporary database and migrade the rows.
or if you cant do that, here's how it should look:
GUILD_INFO:
[Only registered and activated users can see links. Click Here To Register...]


GUILD_PEERAGE:
[Only registered and activated users can see links. Click Here To Register...]