Pet skill error when re log in!

Newbie Spellweaver
Joined
Dec 10, 2011
Messages
29
Reaction score
1
Location
Manila phil.
Everytime i relog in my character!
my pet skill that i gave him is gone!

Here is my Serverside Error text!

DB:{call sp_UpdatePetInven(2142,81,3,26,6,0,0,1,?)}
DB:42000, NativeError:8162, [Microsoft][SQL Server Native Client 11.0][SQL Server]The formal parameter "@nPetInvenSlotIndex" was not declared as an OUTPUT parameter, but the actual parameter passed in requested output.

Thank you in advance for the one who will give a Hints or Clue on how to solve this!
Have a blessed day ahead everyone!



up
up
up
 
Everytime i relog in my character!
my pet skill that i gave him is gone!

Here is my Serverside Error text!

DB:{call sp_UpdatePetInven(2142,81,3,26,6,0,0,1,?)}
DB:42000, NativeError:8162, [Microsoft][SQL Server Native Client 11.0][SQL Server]The formal parameter "@nPetInvenSlotIndex" was not declared as an OUTPUT parameter, but the actual parameter passed in requested output.

Thank you in advance for the one who will give a Hints or Clue on how to solve this!
Have a blessed day ahead everyone!



up
up
up

USE [RanGame1]
GO
/****** Object: StoredProcedure [dbo].[sp_UpdatePetInven] Script Date: 05/22/2019 02:53:05 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


-- Return
-- DB_ERROR -1
-- DB_OK 0
ALTER PROCEDURE [dbo].[sp_UpdatePetInven]
@nChaNum int,
@nPetNum int,
@nPetInvenType int,
@nPetInvenMID int,
@nPetInvenSID int,
@nPetInvenCMID int,
@nPetInvenCSID int,
@nPetInvenAvailable int,
@nReturn int OUTPUT
AS
DECLARE
ERROR_var int,
Rowcount_var int

SET NOCOUNT ON

SET @nReturn = 0

BEGIN TRAN

-- @nPetInvenType = 1 : Accessory for A type
-- @nPetInvenType = 2 : Accessory for B type
-- @nPetInvenType = 3 : Skll

If @nPetInvenType=1 OR @nPetInvenType=2
BEGIN
UPDATE PetInven
SET PetInvenMID = @nPetInvenMID
, PetInvenSID = @nPetInvenSID
, PetInvenCMID = @nPetInvenCMID
, PetInvenCSID = @nPetInvenCSID
, PetInvenUpdateDate = getdate()
WHERE PetNum = @nPetNum And PetChaNum=@nChaNum
And PetInvenType = @nPetInvenType
END
Else If @nPetInvenType=3
BEGIN
UPDATE PetInven
SET PetInvenCMID = @nPetInvenCMID
, PetInvenCSID = @nPetInvenCSID
, PetInvenAvailable = @nPetInvenAvailable
, PetInvenUpdateDate = getdate()
WHERE PetNum = @nPetNum
And PetChaNum = @nChaNum
And PetInvenType = @nPetInvenType
And PetInvenMID = @nPetInvenMID
And PetInvenSID = @nPetInvenSID
END

-- PetInven Update Return Result
SELECT ERROR_var = ERROR, Rowcount_var = RowCOUNT

IF ERROR_var <> 0
BEGIN
ROLLBACK TRAN
SET @nReturn = -1
END
ELSE
BEGIN
COMMIT TRAN
SET @nReturn = 0
END

IF ERROR_var=0 AND Rowcount_var=0)
BEGIN
BEGIN TRAN

INSERT INTO PetInven (PetNum, PetChaNum, PetInvenType, PetInvenMID, PetInvenSID, PetInvenCMID, PetInvenCSID, PetInvenAvailable)
Values (@nPetNum, @nChaNum, @nPetInvenType, @nPetInvenMID, @nPetInvenSID, @nPetInvenCMID, @nPetInvenCSID, @nPetInvenAvailable)

SELECT ERROR_var = ERROR, Rowcount_var = RowCOUNT

IF ERROR_var <> 0 OR Rowcount_var = 0
BEGIN
ROLLBACK TRAN
SET @nReturn = -1
END
ELSE
BEGIN
COMMIT TRAN
SET @nReturn = 0
END
END
SET NOCOUNT OFF
RETURN @nReturn
 
Upvote 0
Msg 137, Level 15, State 2, Procedure sp_UpdatePetInven, Line 57
Must declare the scalar variable "@ERROR".
Msg 102, Level 15, State 1, Procedure sp_UpdatePetInven, Line 70
Incorrect syntax near ')'.
Msg 137, Level 15, State 2, Procedure sp_UpdatePetInven, Line 77
Must declare the scalar variable "@ERROR".



This is my DB error message says! after executing the Query you gave me sir!



Still have the same error! after executing that code BOSS!

DB:42000, NativeError:8162, [Microsoft][SQL Server Native Client 11.0][SQL Server]The formal parameter "@nPetInvenSlotIndex" was not declared as an OUTPUT parameter, but the actual parameter passed in requested output.
 
Upvote 0
delete sp_UpdatePetInven then
parse it again...

what server source you are using ?...

HINT :

source = stored proc must be equal both sides and the client just display the item ...

my pet skill that i gave him is gone!p
the problem is your source it doesn't update the database that's why your pet skill is gone...

Options:
try to test another source :)
 
Last edited:
Upvote 0
this is what i get after so many trials and error!

2000, NativeError:8144, [Microsoft][SQL Server Native Client 11.0][SQL Server]Procedure or function sp_UpdatePetFull has too many arguments specified.

This is my sp_UpdatePetFull

USE [RanGame1]
GO
/****** Object: StoredProcedure [dbo].[sp_UpdatePetFull] Script Date: 6/12/2019 8:44:12 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER 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
 
Upvote 0
Back