Add all card to user

Results 1 to 4 of 4
  1. #1
    Apprentice nismo006 is offline
    MemberRank
    Aug 2011 Join Date
    6Posts

    Add all card to user

    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 by nismo006; 14-08-11 at 06:06 PM.


  2. #2
    Proficient Member bubbastic is offline
    MemberRank
    Nov 2010 Join Date
    WindHillLocation
    181Posts

    Re: ADD ALL CARD TO USER Mod [[ Help me plz ]]

    Quote Originally Posted by nismo006 View Post
    [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.
    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

    TECHNET here


    You can only send 1 card with this SP

  3. #3
    Apprentice nismo006 is offline
    MemberRank
    Aug 2011 Join Date
    6Posts

    Re: ADD ALL CARD TO USER Mod [[ Help me plz ]]

    Quote Originally Posted by bubbastic View Post
    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

    TECHNET here


    You can only send 1 card with this SP

    thank you
    Last edited by nismo006; 14-08-11 at 06:06 PM.

  4. #4
    Apprentice wooocow is offline
    MemberRank
    Sep 2011 Join Date
    13Posts

    Re: ADD ALL CARD TO USER Mod [[ Help me plz ]]

    Quote Originally Posted by bubbastic View Post
    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

    TECHNET here


    You can only send 1 card with this SP
    ys that works
    Last edited by wooocow; 06-10-11 at 01:04 PM. Reason: that works



Advertisement