Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Add all card to user

Status
Not open for further replies.
Newbie Spellweaver
Joined
Aug 10, 2011
Messages
6
Reaction score
0
Code:
USE [Pangya_S4_TH]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


/**************************************************
 * TSU_AddCardToUser                              *
 * Last Update: 2010-12-19                        *
 *                                                *
 * Adds a card from the published cardsets to a   *
 * user's inventory.                              *
 **************************************************/

CREATE PROC [dbo].[TSU_AddCardToUser] (
	@user_id varchar(32),
	@card_id int
)
AS
BEGIN
	DECLARE @user_idx int
	DECLARE @card_type int
	
	SELECT @user_idx = [UID] FROM [Pangya_Member_Info]
	WHERE [userid] = @user_id
	
	IF @@ROWCOUNT = 1
	BEGIN
		SELECT TOP 1 @card_type = [card_type] FROM [TA_CARDPACK_ITEM]
		WHERE CARD_TYPEID = @card_id
		
		IF @@ROWCOUNT = 1
		BEGIN
			INSERT INTO TD_CARD_USRS ( [UID], [CARD_TYPEID], [CARD_TYPE], [QTY], [USE_YN] )
			VALUES ( @user_idx, @card_id, @card_type, 1, N'Y')
			
			RETURN @@ERROR
		END
		ELSE
		BEGIN
			PRINT N'Card does not exist!'
			RETURN 1
		END
	END
	ELSE
	BEGIN
		PRINT N'User does not exist!'
		RETURN 1
	END
END
GO



Msg 2714, Level 16, State 3, Procedure TSU_AddCardToUser, Line 44
There is already an object named 'TSU_AddCardToUser' in the database.

i want ADD ALL CARD TO USER

exp. id jamesbond007

help plz.
---------------------------------------------
today i make room for sell item other player but can't sell item
This error
how do you Fix this problem



sorry i suck english
Thank you very much, sir.
 
Last edited:
Junior Spellweaver
Joined
Nov 12, 2010
Messages
169
Reaction score
69
Re: ADD ALL CARD TO USER Mod [[ Help me plz ]]

Code:
USE [Pangya_S4_TH]
Msg 2714, Level 16, State 3, Procedure TSU_AddCardToUser, Line 44
There is already an object named 'TSU_AddCardToUser' in the database.
[/quote]

This is a normal error as the procedure try to create a Stored Procedure that already has been created before. On first launch, we need to CREATE the procedure. On next launch we need to ALTER the procedure so...

change CREATE PROC to ALTER PROC
[URL="http://technet.microsoft.com/en-us/sqlserver/default"]
TECHNET here[/URL]

You can only send 1 card with this SP
 
Newbie Spellweaver
Joined
Aug 10, 2011
Messages
6
Reaction score
0
Re: ADD ALL CARD TO USER Mod [[ Help me plz ]]

This is a normal error as the procedure try to create a Stored Procedure that already has been created before. On first launch, we need to CREATE the procedure. On next launch we need to ALTER the procedure so...

change CREATE PROC to ALTER PROC


You can only send 1 card with this SP


thank you
 
Last edited:
Newbie Spellweaver
Joined
Sep 4, 2011
Messages
13
Reaction score
0
Re: ADD ALL CARD TO USER Mod [[ Help me plz ]]

This is a normal error as the procedure try to create a Stored Procedure that already has been created before. On first launch, we need to CREATE the procedure. On next launch we need to ALTER the procedure so...

change CREATE PROC to ALTER PROC


You can only send 1 card with this SP
ys that works
 
Last edited:
Status
Not open for further replies.
Back
Top