[Help]Club Battle Request Error
as the title goes :)
Ive encountered an error while inviting a Club Duel with my Enemy :D
Server Files ? - Gunner Server Files :D
Here's the error
PHP Code:
DB:{call sp_RequestGuBattle(18,6,10,0,?)}
DB:42000, NativeError:2812, [Microsoft][SQL Native Client][SQL Server]Could not find stored procedure 'sp_RequestGuBattle'.
Can someone share the Fixed
sp_RequestGuBattle
HOPE SOMEONE CAN HELP ME TO FIX THIS :D! Thanks.
Re: [Help]Club Battle Request Error
Here's the working SP
Quote:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER Procedure [dbo].[sp_EndGuBattle]
@GuSNum int,
@GuPNum int,
@GuFlag int,
@GuKillNum int,
@GuDeathNum int,
@nReturn int OUTPUT
AS
DECLARE @error_var int,
@rowcount_var int
SET NOCOUNT ON
SET @nReturn = 0
SET @error_var = 0
SET @rowcount_var = 0
BEGIN
IF @GuFlag = 6 --Win
begin
UPDATE GuildInfo
SET GuBattleWin = GuBattleWin + 1
WHERE GuNum=@GuSNum
End
else IF @GuFlag = 5 --Lose
Begin
UPDATE GuildInfo
SET GuBattleLose = GuBattleLose + 1
WHERE GuNum=@GuSNum
End
else IF @GuFlag = 1 --Draw
Begin
UPDATE GuildInfo
SET GuBattleDraw = GuBattleDraw + 1
WHERE GuNum=@GuPNum
End
--INSERT INTO GuildBattle (GuSNum, GuPNum, GuFlag, GuKillNum,GuDeathNum)
--VALUES (@GuSNum, @GuPNum, @GuFlag, @GuKillNum,@GuDeathNum)
SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = 0
SET NOCOUNT OFF
RETURN @nReturn
END
END
SET @nReturn = 1
SET NOCOUNT OFF
RETURN @nReturn
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER Procedure [dbo].[sp_RequestGuBattle]
@GuSNum int,
@GuPNum int,
@GuFlag int,
@GuAlliance int,
@nReturn int OUTPUT
AS
DECLARE @error_var int,
@rowcount_var int
SET NOCOUNT ON
SET @nReturn = 0
SET @error_var = 0
SET @rowcount_var = 0
BEGIN
--INSERT INTO GuildBattle (GuSNum, GuPNum, GuFlag, GuAlliance)
--VALUES (@GuSNum, @GuPNum, @GuFlag, @GuAlliance)
SELECT @error_var = @@ERROR, @rowcount_var = @@ROWCOUNT
IF @error_var <> 0 OR @rowcount_var = 0
BEGIN
SET @nReturn = 0
SET NOCOUNT OFF
RETURN @nReturn
END
END
SET @nReturn = 1
SET NOCOUNT OFF
RETURN @nReturn
Re: [Help]Club Battle Request Error