Guild leader help me please

05/06/2010 20:51 Haskoman#1
hi all,

for create guild.

bug create guild no guild leader:rtfm:.

who can help me.

thanks. for help.
05/07/2010 09:32 pieter#2
set peerage code to 0 on your char_no in guil_char_info to make your char guildleader

but if you encounter bugs like this i would seriously start on another set of serverfiles
05/08/2010 13:10 Haskoman#3
Thank you for answered but I had already tried all this, before coming to post

I already have a server running since January and a blow to the other it could be Guild leader after the creation of the guild as well turned good

of where things could come?

heeeeeeelp please:)
05/08/2010 14:44 pieter#4
this happenned suddenly?
do u still have the mastercode guild in guild_info?
05/08/2010 18:08 Haskoman#5
yes one day to the other the Guild leader walked it, while it works well
Yes all the good and the code also perragecode etc. ..
It was really weird, the guild created before the bug it works technically had it to do everything, but now there is no new guild leader lol

I lost it with this bug:(
05/08/2010 18:32 pieter#6
open sql profiler and edit character.dbo.SP_GUILD_CREATE

it should have this content:
Code:
SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO






/******************************************************************
 * ??? : ???
 * ??? : 2005.05.28(SAT)
 * ?  ? : ?? ??
 * ??? : 
			0   = ??
			-99 = ?????? ??.
			-1 	= guild_code ?? ??
		  	-2	= guild_info ????
			-3	= ????? ?? ??.
			-4	= ????(??) ???? ?? ??.
			-5	= ?????? ??? ?? ??.
			-11 = ?? ??? ??
			-12 = ?? ??? ??
 ******************************************************************************
   Ver      Date        Author           Description
   -------  ----------  ---------------  ------------------------------------
   1.0      2005-05-28  ???	   		1. create
   1.1      2005-06-16  ???		    ????? ????.
   1.2      2005-06-24  ???		    ????(??) ???? ??.
   1.3      2005-06-28  ???		    ???? ? ???? ???? ??.
   1.4		2005-08-18	Hanjiwook		?????? DB?? Default ??
										??????? : 'MASTERCODE'	
   1.5		2006-02-06	Hanjiwook		??????(guild_effect)??
 ******************************************************************************/

ALTER      PROCEDURE dbo.SP_GUILD_CREATE
(
	@i_guild_name 			varchar(30),				-- ???
	@i_guild_serv_id 		int,						-- ????ID
	@i_character_name 		varchar(40),				-- ?????
	@i_guild_Level 			varbinary(2),				-- ????
	@i_guild_dil			varbinary(8),				-- ?? ?
	@i_guild_adv 			varbinary(4),				-- ?????
	@i_guild_mark1 			varbinary(2),				-- ????1
	@i_guild_mark2 			varbinary(2),				-- ????2
	@i_guild_effect			varbinary(2),				-- ?????? (2006-02-06 ??)
	@i_guild_notice			varchar(500),				-- ??????
	@o_guild_code 			char(10)		OUTPUT,		-- ????
	@o_peerage_0			varbinary(50)	OUTPUT,		-- ???????0
	@o_peerage_1			varbinary(50)	OUTPUT,		-- ???????1
	@o_peerage_2			varbinary(50)	OUTPUT,		-- ???????2
	@o_peerage_3			varbinary(50)	OUTPUT,		-- ???????3
	@o_peerage_4			varbinary(50)	OUTPUT,		-- ???????4
	@o_peerage_5			varbinary(50)	OUTPUT,		-- ???????5
	@o_peerage_6			varbinary(50)	OUTPUT,		-- ???????6
	@o_peerage_7			varbinary(50)	OUTPUT,		-- ???????7
	@o_peerage_8			varbinary(50)	OUTPUT,		-- ???????8
	@o_peerage_9			varbinary(50)	OUTPUT,		-- ???????9
	@o_sp_rtn				INT			OUTPUT			-- ???
)
AS
	DECLARE @v_ipt_time				datetime
	DECLARE @regdate				varchar(8)
	DECLARE @m_date					varchar(6)
	DECLARE @v_seq_no				numeric
	DECLARE	@tab_nm					varchar(20)
	DECLARE @i_peerage_code			int
	DECLARE @v_master_guild_code	char(10)
BEGIN
	
	SET @v_ipt_time = GetDate()
	--// ??????? Setting
	SET @v_master_guild_code = 'MASTERCODE'
	--// OutPut Parameter ???	
	SET @o_peerage_0 = 0x060000000000
	SET @o_peerage_1 = 0x060100000000
	SET @o_peerage_2 = 0x060200000000
	SET @o_peerage_3 = 0x060300000000
	SET @o_peerage_4 = 0x060400000000
	SET @o_peerage_5 = 0x060500000000
	SET @o_peerage_6 = 0x060600000000
	SET @o_peerage_7 = 0x060700000000
	SET @o_peerage_8 = 0x060800000000
	SET @o_peerage_9 = 0x060900000000
	-------------------------------------------------------------------
	-- ???? ????
	-- ?? : char(10) - YYMM + ????(6) -> 0528000001
	-------------------------------------------------------------------
	SET @o_guild_code	= '0000000000'
	SET @o_sp_rtn		= 0

	SET @i_guild_name 	  = IsNull(@i_guild_name	, '')
	SET @i_character_name = IsNull(@i_character_name, '')

	IF 	Len(@i_guild_name	 )	< 1 OR
		Len(@i_character_name)	< 1 OR
		@i_guild_Level	   	IS NULL OR
		@i_guild_dil		IS NULL OR
		@i_guild_adv		IS NULL 
	BEGIN
		SET @o_sp_rtn = -99
		RETURN
	END
	
	-- ??? ?? (???? / ?????)
	EXEC SP_GUILD_NAME_CHECK @i_guild_name, @o_sp_rtn OUTPUT
	
	IF @o_sp_rtn < 0 			-- ??? ??
	BEGIN
		RETURN
	END	
	
	-- ???? ????? ?? (????_?????)
	SET @tab_nm = 'GUILD_INFO'
	SET @regdate = SUBSTRING(CONVERT(varchar(10),@v_ipt_time,112),1,6)+'01'
	
	-- ?? ???? ??
	EXEC sp_com_seqno @tab_nm, @regdate, @v_seq_no OUTPUT
	
	IF @v_seq_no < 1 			-- ???? ????
	BEGIN
		SET @o_sp_rtn = @v_seq_no
		RETURN
	END	
	
	-- guild_code ??
	SET @m_date = SUBSTRING(CONVERT(varchar(10),@v_ipt_time,112),3,4)
	SET @o_guild_code = @m_date + dbo.FN_GetAutoNo(@v_seq_no,6)
	
	BEGIN TRANSACTION
	--**********************************************************************************
	--// 1. insert into guild_info(?? ??)  table
	--**********************************************************************************
	INSERT INTO GUILD_INFO 
		(	
			guild_code		, 
			guild_name		, 
			guild_serv_id	, 
			guild_Level		,
			guild_dil		, 
			guild_adv		, 
			guild_mark1		, 
			guild_mark2		, 
			guild_effect	,
			guild_notice	, 
			ipt_date 		,
			bystate			,
			byChannel
				
		)
	VALUES	
		( 	
			@o_guild_code	, 
			@i_guild_name	, 
			@i_guild_serv_id, 
			@i_guild_Level	, 
			@i_guild_dil	,
			@i_guild_adv	, 
			isnull(@i_guild_mark1	, 0  )	, 
			isnull(@i_guild_mark2	, 0  )	, 
			isnull(@i_guild_effect	, 0  )	, 
			isnull(@i_guild_notice	, '')	, 
			@v_ipt_time		,
			0				,
			0
		)

	IF @@ERROR <> 0 OR @@ROWCOUNT <> 1
	BEGIN
		ROLLBACK TRANSACTION
		SET @o_sp_rtn = -2
		RETURN
	END

	--**********************************************************************************
	--// ?????? ????? ??.
	--**********************************************************************************
	SET @i_peerage_code = 0
	EXEC dbo.SP_GUILD_CHAR_CREATE 	@o_guild_code		, 
									@i_character_name	, 
									@i_peerage_code		, 
									@o_sp_rtn OUTPUT 
	IF @o_sp_rtn <> 0 OR @@Error <> 0
	BEGIN
		IF @@TRANCOUNT > 0 	ROLLBACK TRAN
		SET @o_sp_rtn = -3
		RETURN
	END
	--**********************************************************************************
	--// ???????? ??
	--**********************************************************************************
	INSERT INTO GUILD_PEERAGE
	(		
			guild_code	,	--????
			peerage_code,	--????
			auth_info	,	--????
			peerage_name	--???
	)
	SELECT	@o_guild_code,
			peerage_code,
			auth_info,
			peerage_name
	FROM	Guild_Peerage
	WHERE	guild_code = @v_master_guild_code
	
	IF @@ERROR <> 0
	BEGIN
		ROLLBACK TRANSACTION
		SET @o_sp_rtn = -4
		RETURN
	END
	--**********************************************************************************
	--// ????List ??
	--**********************************************************************************
	EXEC dbo.SP_GUILD_PEERAGE_LIST	@o_guild_code	,			-- ????
									@o_peerage_0	OUTPUT,		-- ???????0
									@o_peerage_1	OUTPUT,		-- ???????1
									@o_peerage_2	OUTPUT,		-- ???????2
									@o_peerage_3	OUTPUT,		-- ???????3
									@o_peerage_4	OUTPUT,		-- ???????4
									@o_peerage_5	OUTPUT,		-- ???????5
									@o_peerage_6	OUTPUT,		-- ???????6
									@o_peerage_7	OUTPUT,		-- ???????7
									@o_peerage_8	OUTPUT,		-- ???????8
									@o_peerage_9	OUTPUT,		-- ???????9
									@o_sp_rtn		OUTPUT		
	
	IF @@ERROR <> 0 OR @o_sp_rtn <> 0
	BEGIN
		ROLLBACK TRANSACTION
		SET @o_sp_rtn = -5
		RETURN
	END

	COMMIT TRAN
	SET @o_sp_rtn = 0
	RETURN
END





GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
if it's different (??? should be korean but is all comment so doesnt matter)
replace it and press alt-x to save
05/08/2010 22:27 Haskoman#7
yes I am but I still say it even changed but it does not change anything that was why I find it odd that it gives not the right leader for the guild!
what misery this bug, so that it works yet.
05/15/2010 18:42 Haskoman#8
help please:confused:
05/18/2010 21:59 ҉ THT ҉#9
backup if you have player, if its clean and empty just redownload a new database