数据库异常:为过程或函数GSP_GR_WriteGameScore指定了过多的参数?删除原GSP_GR_WriteGameScore存储脚本,重新执行以下脚本内容即可!
解决方法:
1、删除原存储过程 'GSP_GR_WriteGameScore'
看上图,在红框里找到'GSP_GR_WriteGameScore'并删除。
2、执行存储过程 'GSP_GR_WriteGameScore'
脚本内容:
USE RYTreasureDB GO SET ANSI_NULLS, QUOTED_IDENTIFIER ON GO ---------------------------------------------------------------------------------------------------- -- 游戏写分 CREATE PROC GSP_GR_WriteGameScore -- 用户信息 @dwUserID INT, -- 用户 I D @dwDBQuestID INT, -- 请求标识 @dwInoutIndex INT, -- 进出索引 -- 变更成绩 @lVariationScore BIGINT, -- 用户分数 @lVariationGrade BIGINT, -- 用户成绩 @lVariationInsure BIGINT, -- 用--户--银--行 @lVariationRevenue BIGINT, -- 游--戏--税--收 @lVariationWinCount INT, -- 胜--利--盘--数 @lVariationLostCount INT, -- 失--败--盘--数 @lVariationDrawCount INT, -- 和--局--盘--数 @lVariationFleeCount INT, -- 逃--跑--数--目 @lVariationIntegralCount BIGINT, -- 游戏积分 @lVariationUserMedal BIGINT, -- 用户奖牌 @lVariationExperience INT, -- 用户经验 @lVariationLoveLiness INT, -- 用户魅力 @dwVariationPlayTimeCount INT, -- 游戏时间 -- 附加信息 @cbTaskForward TINYINT, -- 任务跟进 -- 属性信息 @wKindID INT, -- 游戏 I D @wServerID INT, -- 房间 I D @strClientIP NVARCHAR(15) -- 连接地址 WITH ENCRYPTION AS -- 属性设置 SET NOCOUNT ON -- 执行逻辑 BEGIN -- 用户积分 UPDATE GameScoreInfo SET Score=Score+@lVariationScore, Revenue=Revenue+@lVariationRevenue, InsureScore=InsureScore+@lVariationInsure, WinCount=WinCount+@lVariationWinCount, LostCount=LostCount+@lVariationLostCount, DrawCount=DrawCount+@lVariationDrawCount, FleeCount=FleeCount+@lVariationFleeCount,PlayTimeCount=PlayTimeCount+@dwVariationPlayTimeCount WHERE UserID=@dwUserID -- 房间参数 UPDATE GameScoreAttribute SET IntegralCount=IntegralCount+@lVariationIntegralCount, WinCount=WinCount+@lVariationWinCount, LostCount=LostCount+@lVariationLostCount, DrawCount=DrawCount+@lVariationDrawCount, FleeCount=FleeCount+@lVariationFleeCount WHERE UserID=@dwUserID And ServerID=@wServerID And KindID = @wKindID IF @@ROWCOUNT=0 BEGIN INSERT INTO GameScoreAttribute (UserID,KindID,ServerID,IntegralCount,WinCount,LostCount,DrawCount,FleeCount) VALUES (@dwUserID,@wKindID,@wServerID,@lVariationIntegralCount,@lVariationWinCount,@lVariationLostCount,@lVariationDrawCount,@lVariationFleeCount) END -- modified by zld 增加游戏日志,游戏场景功能 -- -- 全局信息 -- IF @lVariationExperience>0 OR @lVariationLoveLiness<>0 OR @lVariationUserMedal>0 -- BEGIN -- UPDATE RYAccountsDBLink.RYAccountsDB.dbo.AccountsInfo SET Experience=Experience+@lVariationExperience, LoveLiness=LoveLiness+@lVariationLoveLiness, -- UserMedal=UserMedal+@lVariationUserMedal -- WHERE UserID=@dwUserID -- END -- modified end -- 变更记录 DECLARE @DateID INT SELECT @DateID=CAST(CAST(GetDate() AS FLOAT) AS INT) -- 存在判断 IF NOT EXISTS(SELECT * FROM StreamScoreInfo WHERE DateID=@DateID AND UserID=@dwUserID) BEGIN -- 插入记录 INSERT INTO StreamScoreInfo(DateID, UserID, WinCount, LostCount, Revenue, PlayTimeCount, OnlineTimeCount, FirstCollectDate, LastCollectDate) VALUES(@DateID, @dwUserID, @lVariationWinCount, @lVariationLostCount, @lVariationRevenue, @dwVariationPlayTimeCount, 0, GetDate(), GetDate()) END ELSE BEGIN -- 更新记录 UPDATE StreamScoreInfo SET WinCount=WinCount+@lVariationWinCount, LostCount=LostCount+@lVariationLostCount, Revenue=Revenue+@lVariationRevenue, PlayTimeCount=PlayTimeCount+@dwVariationPlayTimeCount, LastCollectDate=GetDate() WHERE DateID=@DateID AND UserID=@dwUserID END -- modified by zld 增加游戏日志,游戏场景功能 -- -- 任务推进 -- IF @cbTaskForward=1 -- BEGIN -- exec RYPlatformDBLink.RYPlatformDB.dbo.GSP_GR_TaskForward @dwUserID,@wKindID,0,@lVariationWinCount,@lVariationLostCount,@lVariationDrawCount -- END -- modified end END RETURN 0 GO
END!!!
- 1、删除原存储过程 'GSP_GR_WriteGameScore'
- 2、执行存储过程 'GSP_GR_WriteGameScore'
发表评论