Itemmall rollback

11/07/2015 17:26 Pave99#1
Hi. I have a problem with my itemmall. When i buy anything from itemmall and go to character screen i lose item. I have no dc's, no errors in logs, no nothing. So i dont know where to start.
I'm using shen1l's itemmall and SQL 2014, but i modified the dll since it had UID; shaiya PW; Shaiya123 but mine is different.
Any help is appreciated...
11/07/2015 18:45 Truth1010#2
If i remember correctly. The thread linked to Shen's release recommends using SQL 2008R2. There was another release with edited files which worked better with 2012/2014, but i haven't looked at those.
11/07/2015 21:43 Pave99#3
Alright. I'll check if I can find anything
11/07/2015 21:50 SnickQ#4
Are you using his Stored Proc?
Code:
USE PS_GameData

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

create   Proc [dbo].[usp_Save_User_BuyPointItems2]

@UserUID int,
@CharID int,
@UsePoint int,
@ProductCode varchar(20),
@UseDate datetime

AS

SET NOCOUNT ON
--SET XACT_ABORT ON

DECLARE @UseType 	int
DECLARE @Ret 		int
DECLARE @RemainPoint  	int
DECLARE @OrderNumber 	int
DECLARE @ReturnValue int

SET @Ret = 0

SET @UseType = 1 -- ??

BEGIN DISTRIBUTED TRANSACTION

/*========================================
??? ??
??? ?? ?? ?? UID ? ?? ?? UID? ??? ???? ???.
procRequestOrderProductByGame

???? UID       @buyClientUserNumber               BIGINT
???? UID       @receiveClientUserNumber           BIGINT
?????         @itemCode                          VARCHAR(50)
?? ??          @resultCode                        SMALLINT           	OUTPUT
?? ? ??       @cashBalanceAfterOrder             INT                      	OUTPUT
????	   @orderNumber			      INT			OUTPUT

resultCode
0            ??
1            ????
2            ?? ??? ???? ??
3            ?? ???? ???? ??
5            DB??
6            ????
=========================================*/
EXEC @ReturnValue = game.PS_UserData.dbo.usp_Update_UserPoint @UserUID, @UsePoint
IF ( @ReturnValue < 0 )
BEGIN
	GOTO ERROR
END

/*IF ( @Ret <> 0 )
BEGIN  
	INSERT INTO PointErrorLog( UserUID, CharID, ProductCode, Ret) 	VALUES( @UserUID, @CharID, @ProductCode, @Ret )
	GOTO ERROR
END
---------------------------------------------
*/

-- ??? ?? ??
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCode,UseDate,RemainPoint,OrderNumber)
VALUES(@UseType,@UserUID,@CharID,@UsePoint,@ProductCode,@UseDate,@RemainPoint,@OrderNumber)
IF( @@ERROR<>0)
BEGIN
	GOTO ERROR
END

COMMIT TRAN
RETURN 1

ERROR:
ROLLBACK TRAN
RETURN -1


SET XACT_ABORT OFF
SET NOCOUNT OFF

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
11/08/2015 08:28 Pave99#5
Quote:
Originally Posted by SnickQ View Post
Are you using his Stored Proc?
Code:
USE PS_GameData

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

create   Proc [dbo].[usp_Save_User_BuyPointItems2]

@UserUID int,
@CharID int,
@UsePoint int,
@ProductCode varchar(20),
@UseDate datetime

AS

SET NOCOUNT ON
--SET XACT_ABORT ON

DECLARE @UseType 	int
DECLARE @Ret 		int
DECLARE @RemainPoint  	int
DECLARE @OrderNumber 	int
DECLARE @ReturnValue int

SET @Ret = 0

SET @UseType = 1 -- ??

BEGIN DISTRIBUTED TRANSACTION

/*========================================
??? ??
??? ?? ?? ?? UID ? ?? ?? UID? ??? ???? ???.
procRequestOrderProductByGame

???? UID       @buyClientUserNumber               BIGINT
???? UID       @receiveClientUserNumber           BIGINT
?????         @itemCode                          VARCHAR(50)
?? ??          @resultCode                        SMALLINT           	OUTPUT
?? ? ??       @cashBalanceAfterOrder             INT                      	OUTPUT
????	   @orderNumber			      INT			OUTPUT

resultCode
0            ??
1            ????
2            ?? ??? ???? ??
3            ?? ???? ???? ??
5            DB??
6            ????
=========================================*/
EXEC @ReturnValue = game.PS_UserData.dbo.usp_Update_UserPoint @UserUID, @UsePoint
IF ( @ReturnValue < 0 )
BEGIN
	GOTO ERROR
END

/*IF ( @Ret <> 0 )
BEGIN  
	INSERT INTO PointErrorLog( UserUID, CharID, ProductCode, Ret) 	VALUES( @UserUID, @CharID, @ProductCode, @Ret )
	GOTO ERROR
END
---------------------------------------------
*/

-- ??? ?? ??
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCode,UseDate,RemainPoint,OrderNumber)
VALUES(@UseType,@UserUID,@CharID,@UsePoint,@ProductCode,@UseDate,@RemainPoint,@OrderNumber)
IF( @@ERROR<>0)
BEGIN
	GOTO ERROR
END

COMMIT TRAN
RETURN 1

ERROR:
ROLLBACK TRAN
RETURN -1


SET XACT_ABORT OFF
SET NOCOUNT OFF

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
Thank you, but yes i'm using it.

It seem to be fixed after changing dbagent to fixed one. Ty all
#req close
11/08/2015 09:30 Truth1010#6
If you could link the file/location you found your fix it would be great.

That way, other people with the same problem in the future can find there fix.
Saves another thread with the same questions being asked again.
11/08/2015 15:04 Pave99#7
I fixed it with [Only registered and activated users can see links. Click Here To Register...]
11/08/2015 18:31 SkuulCandy#8
Yes check dbAgent ^^