搜索
 找回密码
 加入

新问题:每次进入游戏都要选择国家,而且同一个账号也有问题!请教!

koollook 2008-10-19 18:18:03 1071
新问题:每次进入游戏都要选择国家,而且同一个账号可以同时有兽族和人族的人物,怎么解决,谢谢!!!

2 回复

yangwx
2008-10-18 16:28:08
点击查看详情
把这个ACCOUNT_LOGIN存储过程改为如下:
  1. CREATE PROCEDURE ACCOUNT_LOGIN
  2. @AccountID        varchar(21),
  3. @Password        varchar(13),
  4. @nRet                smallint        OUTPUT

  5. AS


  6. DECLARE @Nation tinyint, @CharNum smallint
  7. SET @Nation = 0
  8. SET @CharNum = 0

  9. DECLARE @pwd varchar(13)

  10. SET @pwd = null

  11. SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and idays=6
  12. IF @pwd IS null
  13. BEGIN
  14.         SET @nRet = 0
  15.              --SET @nRet = 4
  16.         RETURN
  17. END

  18. ELSE IF @pwd <> @Password
  19. BEGIN
  20.         SET @nRet = 0
  21.              --SET @nRet = 3
  22.         RETURN
  23. END

  24. DECLARE @gokhantasci varchar(21)
  25. select @gokhantasci = count(straccountid)  FROM premium_service WHERE strAccountID = @AccountID

  26. if @gokhantasci = 0
  27. begin
  28. insert into PREMIUM_SERVICE (strAccountID, strType, nDays) VALUES (@AccountID, 1, 3)
  29. end

  30. SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
  31. IF @@ROWCOUNT = 0
  32. BEGIN
  33.         SET @nRet = 1
  34.         RETURN
  35. END
  36. IF @CharNum = 0
  37. BEGIN
  38.         SET @nRet = 1
  39.         RETURN
  40. END
  41. ELSE
  42. BEGIN
  43.         SET @nRet = @Nation+1
  44.              --SET @nRet = 1
  45.         RETURN
  46. END
  47. GO
复制代码

评分

1

查看全部评分

koollook
2008-10-19 18:18:03
楼主
按楼上的这样做了后,游戏输完账号和密码后就提示此服务器出现错误
高级模式
游客