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!

Can Any Help Me With This About Sql

Exploring The World
Joined
Apr 21, 2008
Messages
452
Reaction score
54
I can`t find this

Msg 2714, Level 16, State 6, Line 1
There is already an object named 'PetInven' in the database.
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'PetInfo' in the database.
Msg 2714, Level 16, State 3, Procedure sp_LogPetAction_Insert, Line 11
There is already an object named 'sp_LogPetAction_Insert' in the database.
Msg 2714, Level 16, State 3, Procedure sp_GetPetFull, Line 19
There is already an object named 'sp_GetPetFull' in the database.
Msg 2714, Level 16, State 3, Procedure sp_UpdatePetFull, Line 29
There is already an object named 'sp_UpdatePetFull' in the database.
Msg 2714, Level 16, State 3, Procedure sp_DeletePet, Line 12
There is already an object named 'sp_DeletePet' in the database.
Msg 2714, Level 16, State 3, Procedure sp_UpdatePetInven, Line 44
There is already an object named 'sp_UpdatePetInven' in the database.
Msg 2714, Level 16, State 3, Procedure sp_Extreme, Line 19
There is already an object named 'sp_Extreme' in the database.
Msg 2714, Level 16, State 3, Procedure sp_UpdatePetChaNum, Line 30
There is already an object named 'sp_UpdatePetChaNum' in the database.
Msg 2714, Level 16, State 3, Procedure sp_RestorePet, Line 13
There is already an object named 'sp_RestorePet' in the database.
Msg 2714, Level 16, State 3, Procedure sp_UpdatePetColor, Line 28
There is already an object named 'sp_UpdatePetColor' in the database.
Msg 2714, Level 16, State 3, Procedure sp_UpdatePetStyle, Line 28
There is already an object named 'sp_UpdatePetStyle' in the database.
Msg 2714, Level 16, State 3, Procedure sp_RenamePet, Line 25
There is already an object named 'sp_RenamePet' in the database.
Msg 2714, Level 16, State 3, Procedure sp_InsertPet, Line 59
There is already an object named 'sp_InsertPet' in the database.
Msg 2714, Level 16, State 3, Procedure RenameCharacter, Line 25
There is already an object named 'RenameCharacter' in the database.
Msg 207, Level 16, State 1, Procedure UpdateChaHairStyle, Line 0
Invalid column name 'ChaHairStyle'.
Msg 2714, Level 16, State 3, Procedure UpdateChaHairColor, Line 31
There is already an object named 'UpdateChaHairColor' in the database.

sorry for that i just can``t remeber how can to delete that so that i can execute this

USE [RanGame1]
GO
/****** Object: Table [dbo].[PetInven] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PetInven](
[PetInvenNum] [bigint] IDENTITY(1,1) NOT NULL,
[PetNum] [bigint] NOT NULL,
[PetInvenType] [int] NULL CONSTRAINT [DF_PetInven_PetInvenType] DEFAULT ((0)),
[PetInvenMID] [int] NULL CONSTRAINT [DF_PetInven_PetInvenMID] DEFAULT ((0)),
[PetInvenSID] [int] NULL CONSTRAINT [DF_PetInven_PetInvenSID] DEFAULT ((0)),
[PetInven] [int] NULL CONSTRAINT [DF_PetInven_PetInven] DEFAULT ((0)),
[PetInventory] [int] NULL CONSTRAINT [DF_PetInven_PetInventory] DEFAULT ((0)),
[PetInvenAvailable] [int] NULL CONSTRAINT [DF_PetInven_PetInvenAvailable] DEFAULT ((0)),
CONSTRAINT [PK_PetInven] PRIMARY KEY CLUSTERED
(
[PetInvenNum] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[PetInfo] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PetInfo](
[PetNum] [bigint] IDENTITY(1,1) NOT NULL,
[PetName] [varchar](20) NOT NULL,
[PetChaNum] [int] NOT NULL,
[PetType] [int] NULL CONSTRAINT [DF_PetInfo_PetType] DEFAULT ((0)),
[PetMID] [int] NULL CONSTRAINT [DF_PetInfo_PetMID] DEFAULT ((0)),
[PetSID] [int] NULL CONSTRAINT [DF_PetInfo_PetSID] DEFAULT ((0)),
[PetCardMID] [int] NULL CONSTRAINT [DF_PetInfo_PetCardMID] DEFAULT ((0)),
[PetCardSID] [int] NULL CONSTRAINT [DF_PetInfo_PetCardSID] DEFAULT ((0)),
[PetStyle] [int] NULL CONSTRAINT [DF_PetInfo_PetStyle] DEFAULT ((0)),
[PetColor] [int] NULL CONSTRAINT [DF_PetInfo_PetColor] DEFAULT ((0)),
[PetFull] [int] NULL CONSTRAINT [DF_PetInfo_PetFull] DEFAULT ((1000)),
[PetDeleted] [int] NULL CONSTRAINT [DF_PetInfo_PetDeleted] DEFAULT ((0)),
[PetPutOnItems] [image] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: StoredProcedure [dbo].[sp_LogPetAction_Insert] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_LogPetAction_Insert]
@nPetLog1 int,
@nPetLog2 int,
@nPetLog3 int,
@nPetLog4 int,
@nPetLog5 int,
@nReturn int OUTPUT
AS
SET NOCOUNT ON
SET NOCOUNT OFF
RETURN @nReturn
GO
/****** Object: StoredProcedure [dbo].[sp_GetPetFull] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_GetPetFull]
@nPetNum bigint,
@nReturn int OUTPUT
AS
SET NOCOUNT ON

SET @nReturn = 0

IF EXISTS (SELECT PetFull FROM PetInfo WHERE PetNum=@nPetNum)
BEGIN
SET @nReturn = 1
END
ELSE
BEGIN
SET @nReturn = 0
END
SET NOCOUNT OFF

RETURN @nReturn
GO
/****** Object: StoredProcedure [dbo].[sp_UpdatePetFull] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_UpdatePetFull]
@nPetNum bigint,
@nPetFull int,
@nReturn int OUTPUT
AS
DECLARE
@error_var int,
@rowcount_var int

SET NOCOUNT ON

SET @nReturn = 0

UPDATE PetInfo
SET PetFull=@nPetFull
WHERE PetNum=@nPetNum

SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = -1
SET NOCOUNT OFF
RETURN @nReturn
END
ELSE
BEGIN
SET @nReturn = 0
SET NOCOUNT OFF
RETURN @nReturn
END
GO
/****** Object: StoredProcedure [dbo].[sp_DeletePet] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_DeletePet]
@nPetNum int,
@nReturn int OUTPUT
AS
SET NOCOUNT ON

UPDATE PetInfo
SET PetDeleted = 1
WHERE PetNum=@nPetNum

SET NOCOUNT OFF
RETURN @nReturn
GO
/****** Object: StoredProcedure [dbo].[sp_UpdatePetInven] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_UpdatePetInven]
@nPetNum bigint,
@nPetInvenType int,
@nPetInvenMID int,
@nPetInvenSID int,
@nPetInven int,
@nPetInventory int,
@nPetInvenAvailable int,
@nReturn int OUTPUT
AS
DECLARE @nPetInvenNum bigint,
@error_var int,
@rowcount_var int

SET NOCOUNT ON

IF EXISTS(SELECT * FROM PetInven WHERE PetNum=@nPetNum AND PetInvenType=@nPetInvenType AND PetInvenMID=@nPetInvenMID AND PetInvenSID=@nPetInvenSID AND PetInven=@nPetInven AND PetInventory=@nPetInventory)
BEGIN
SELECT @nPetInvenNum=PetInvenNum
FROM PetInven
WHERE PetNum=@nPetNum AND PetInvenType=@nPetInvenType AND PetInvenMID=@nPetInvenMID AND PetInvenSID=@nPetInvenSID AND PetInven=@nPetInven AND PetInventory=@nPetInventory

UPDATE PetInven
SET PetInvenAvailable=@nPetInvenAvailable
WHERE PetNum=@nPetNum AND PetInvenType=@nPetInvenType AND PetInvenMID=@nPetInvenMID AND PetInvenSID=@nPetInvenSID AND PetInven=@nPetInven AND PetInventory=@nPetInventory
SET NOCOUNT OFF
END
ELSE
BEGIN
INSERT INTO PetInven (PetNum, PetInvenType, PetInvenMID, PetInvenSID, PetInven, PetInventory, PetInvenAvailable)
VALUES(@nPetNum, @nPetInvenType, @nPetInvenMID, @nPetInvenSID, @nPetInven, @nPetInventory, @nPetInvenAvailable)
END
SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = -1
SET NOCOUNT OFF
RETURN @nReturn
END
ELSE
BEGIN
SET @nReturn = 0
SET NOCOUNT OFF
RETURN @nReturn
END
GO
/****** Object: StoredProcedure [dbo].[sp_Extreme] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_Extreme]
@nChaClass int
AS

SET NOCOUNT ON

SELECT ChaSex FROM ChaInfo WHERE ChaClass=@nChaClass

IF (@nChaClass = 1 OR @nChaClass = 2)
BEGIN
UPDATE ChaInfo
SET ChaSex = 1
SET NOCOUNT OFF
END
IF (@nChaClass = 4 OR @nChaClass = 8)
BEGIN
UPDATE ChaInfo
SET ChaSex = 0
SET NOCOUNT OFF
END
GO
/****** Object: StoredProcedure [dbo].[sp_UpdatePetChaNum] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_UpdatePetChaNum]
@nPetNum bigint,
@nPetChaNum int,
@nReturn int OUTPUT
AS
DECLARE @error_var int,
@rowcount_var int

SET NOCOUNT ON

SET @nReturn = 0
SET @error_var = 0
SET @rowcount_var = 0

UPDATE PetInfo
SET PetChaNum=@nPetChaNum
WHERE PetNum=@nPetNum

SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = -1
SET NOCOUNT OFF
RETURN @nReturn
END
ELSE
BEGIN
SET @nReturn = 0
SET NOCOUNT OFF
RETURN @nReturn
END
GO
/****** Object: StoredProcedure [dbo].[sp_RestorePet] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_RestorePet]
@nPetNum bigint,
@nPetChaNum int,
@nReturn int OUTPUT
AS
SET NOCOUNT ON

SELECT PetName, PetChaNum, PetType, PetMID, PetSID, PetCardMID, PetCardSID, PetStyle, PetColor, PetFull
FROM PetInfo
WHERE PetNum=@nPetNum AND PetChaNum=@nPetChaNum

SET NOCOUNT OFF
RETURN @nReturn
GO
/****** Object: StoredProcedure [dbo].[sp_UpdatePetColor] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_UpdatePetColor]
@nPetNum bigint,
@nPetColor int,
@nReturn int OUTPUT
AS
DECLARE @error_var int,
@rowcount_var int

SET NOCOUNT ON

SET @nReturn = 0

UPDATE PetInfo
SET PetColor=@nPetColor
WHERE PetNum=@nPetNum

SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = -1
SET NOCOUNT OFF
RETURN @nReturn
END
ELSE
BEGIN
SET @nReturn = 0
SET NOCOUNT OFF
RETURN @nReturn
END
GO
/****** Object: StoredProcedure [dbo].[sp_UpdatePetStyle] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_UpdatePetStyle]
@nPetNum bigint,
@nPetStyle int,
@nReturn int OUTPUT
AS
DECLARE @error_var int,
@rowcount_var int

SET NOCOUNT ON

SET @nReturn = 0

UPDATE PetInfo
SET PetStyle=@nPetStyle
WHERE PetNum=@nPetNum

SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = -1
SET NOCOUNT OFF
RETURN @nReturn
END
ELSE
BEGIN
SET @nReturn = 0
SET NOCOUNT OFF
RETURN @nReturn
END
GO
/****** Object: StoredProcedure [dbo].[sp_RenamePet] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_RenamePet]
@nPetNum int,
@szPetName varchar(20),
@nReturn int OUTPUT
AS
DECLARE @error_var int, -- Declare variables used in error checking.
@rowcount_var int

SET NOCOUNT ON

UPDATE PetInfo
SET PetName = @szPetName
WHERE PetNum = @nPetNum

SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = 1
END
ELSE
BEGIN
SET @nReturn = 0
END
SET NOCOUNT OFF
RETURN @nReturn
GO
/****** Object: StoredProcedure [dbo].[sp_InsertPet] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_InsertPet]
@szPetName varchar(20),
@nPetChaNum bigint,
@nPetType int,
@nPetMID int,
@nPetSID int,
@nPetCardMID int,
@nPetCardSID int,
@nPetStyle int,
@nPetColor int,
@nReturn int OUTPUT
AS
DECLARE @nPetNum int,
@nPetDeleted int,
@error_var int,
@rowcount_var int

SET NOCOUNT ON

SET @nReturn = 0
SET @nPetNum = 0
SET @error_var = 0
SET @rowcount_var = 0

-----------------------------------------------------------------
SELECT @nPetNum=PetNum
FROM PetInfo
WHERE PetChaNum=@nPetChaNum AND PetName=@szPetName AND PetType=@nPetType AND PetMID=@nPetMID AND PetSID=@nPetSID AND PetCardMID=@nPetCardMID AND PetCardSID=@nPetCardSID AND PetDeleted = 0

IF @nPetNum <> 0
BEGIN
SET @nReturn = 0
SET NOCOUNT OFF
RETURN @nReturn
END
-----------------------------------------------------------------
INSERT INTO PetInfo (PetName, PetChaNum, PetType, PetMID, PetSID, PetCardMID, PetCardSID, PetStyle, PetColor)
VALUES (@szPetName, @nPetChaNum, @nPetType, @nPetMID, @nPetSID, @nPetCardMID, @nPetCardSID, @nPetStyle, @nPetColor)

SELECT @error_var = @@ERROR
IF @error_var <> 0
BEGIN
SET @nReturn = -2
SET NOCOUNT OFF
RETURN @nReturn
END

-----------------------------------------------------------------
SELECT @nPetNum=@@IDENTITY

SET @nReturn = @nPetNum
-----------------------------------------------------------------
/*Pet Owner*/
UPDATE PetInfo
SET PetChaNum=@nPetChaNum
WHERE PetNum=@nPetNum

SET NOCOUNT OFF
RETURN @nReturn
GO
/****** Object: StoredProcedure [dbo].[RenameCharacter] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[RenameCharacter]
@nChaNum int,
@szChaName varchar(20),
@nReturn int OUTPUT
AS
DECLARE @error_var int, -- Declare variables used in error checking.
@rowcount_var int

SET NOCOUNT ON

UPDATE ChaInfo
SET ChaName = @szChaName
WHERE ChaNum = @nChaNum

SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = 1
END
ELSE
BEGIN
SET @nReturn = 0
END
SET NOCOUNT OFF
RETURN @nReturn
GO
/****** Object: StoredProcedure [dbo].[UpdateChaHairStyle] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[UpdateChaHairStyle]
@nChaNum int,
@nChaHairStyle int,
@nReturn int OUTPUT
AS
DECLARE @error_var int,
@rowcount_var int

SET NOCOUNT ON

SET @nReturn = 0
SET @error_var = 0
SET @rowcount_var = 0

UPDATE ChaInfo
SET ChaHairStyle=@nChaHairStyle
WHERE ChaNum=@nChaNum

-- Check Error
SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = -1 -- ERROR
SET NOCOUNT OFF
RETURN @nReturn
END
ELSE
BEGIN
SET @nReturn = 0 -- SUCCESS
SET NOCOUNT OFF
RETURN @nReturn
END
GO
/****** Object: StoredProcedure [dbo].[UpdateChaHairColor] Script Date: 10/07/2008 00:15:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[UpdateChaHairColor]
@nChaNum int,
@nChaHairColor int,
@nReturn int OUTPUT
AS
DECLARE @error_var int,
@rowcount_var int

SET NOCOUNT ON

SET @nReturn = 0
SET @error_var = 0
SET @rowcount_var = 0

UPDATE ChaInfo
SET ChaHairColor=@nChaHairColor
WHERE ChaNum=@nChaNum

-- Check Error
SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = -1 -- ERROR
SET NOCOUNT OFF
RETURN @nReturn
END
ELSE
BEGIN
SET @nReturn = 0 -- SUCCESS
SET NOCOUNT OFF
RETURN @nReturn
END
GO
sorry for that please help me...i realy nid so that my pet will not roll back
 
Exploring The World
Joined
Apr 21, 2008
Messages
452
Reaction score
54
wow...tnx bro your shadow ran is cool for me...hehehe...your angel set is very good my friend
 
Upvote 0
Saucepan
Loyal Member
Joined
Jun 16, 2008
Messages
710
Reaction score
29
Download the complete pet db from the tutorial (How to make your own EP4 server).
 
Upvote 0
Back
Top