- Joined
- May 7, 2006
- Messages
- 7
- Reaction score
- 0
I realized when somebody purchase an item discounts to all the players.
Error in stored procedures!!
Help me!!
en espa
Error in stored procedures!!
Help me!!
en espa
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!set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[spBuyBountyItem]
@nCID INT,
@nItemID INT,
@nPrice INT
AS
BEGIN
SET NOCOUNT ON;
UPDATE Character SET BP = BP-@nPrice
INSERT INTO Items
VALUES(@nCID,@nItemID,NULL)
SELECT 0 OrderCIID
END
To fix the bounty. Change your database. At dbo.SpBuyBountyItem
and put this code in it
Code:set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[spBuyBountyItem] @nCID INT, @nItemID INT, @nPrice INT AS BEGIN SET NOCOUNT ON; UPDATE Character SET BP = BP-@nPrice INSERT INTO Items VALUES(@nCID,@nItemID,NULL) SELECT 0 OrderCIID END
Credits to -Lambda- .
CREATE PROCEDURE [dbo].[spBuyBountyItem]
@nCID INT,
@nItemID INT,
@nPrice INT
AS
BEGIN
SET NOCOUNT ON;
[COLOR="Red"] UPDATE Character SET BP = BP-@nPrice WHERE CID = @nCID [/COLOR]
INSERT INTO Items
VALUES(@nCID,@nItemID,NULL)
SELECT 0 OrderCIID
END
Nope, You need to put this code in:
Code:CREATE PROCEDURE [dbo].[spBuyBountyItem] @nCID INT, @nItemID INT, @nPrice INT AS BEGIN SET NOCOUNT ON; [COLOR=red]UPDATE Character SET BP = BP-@nPrice WHERE CID = @nCID [/COLOR] INSERT INTO Items VALUES(@nCID,@nItemID,NULL) SELECT 0 OrderCIID END