[Request]Caipi's Silk/Hour System Is Kinda Bugged!

02/11/2014 14:57 khaledlollol#1
PHP Code:
USE [SRO_VT_ACCOUNT]
GO
/****** Object:  StoredProcedure [dbo].[_extraSilk]    Script Date: 02/11/2014 15:53:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE 
[dbo].[_extraSilk/*by Caipi*/

    
@CharID int,
    @
Silk int

as

Declare @
JID int, @Multiplier int = (SELECT [Silk/HourFROM Log_DB.dbo._OnlineOffline WHERE CharID = @CharID);

SET @JID = (
            
SELECT usert.UserJID FROM SRO_VT_SHARD_INIT.dbo._User as usert
            JOIN SRO_VT_SHARD_INIT
.dbo._Char as chart on usert.CharID chart.CharID
            WHERE chart
.CharID = @CharID
            
);
            
    IF 
not exists (SELECT JID FROM SK_Silk WHERE JID = @JID)
        
BEGIN
            INSERT INTO SK_Silk SELECT 
@JID000
        END
            
    UPDATE SK_Silk
    SET silk_own 
silk_own + (@Silk*@Multiplier)
    
WHERE JID = @JID 
I guess this is buggy cuz all tables are working i get silk @ Online/Offline table it counts the gameplay and adds silk to eSilk.. but no silk is added to SK_Silk nothing is added at this table its empty..

And every thing is added without errors (SQL2008R2)
Any help is Appreciated.
Thank you..
02/11/2014 16:09 InPanic Kev#2
read the sql and you know why its not working ;)
02/11/2014 17:09 retontoxD#3
Quote:
Originally Posted by khaledlollol View Post
PHP Code:
USE [SRO_VT_ACCOUNT]
GO
/****** Object:  StoredProcedure [dbo].[_extraSilk]    Script Date: 02/11/2014 15:53:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE 
[dbo].[_extraSilk/*by Caipi*/

    
@CharID int,
    @
Silk int

as

Declare @
JID int, @Multiplier int = (SELECT [Silk/HourFROM Log_DB.dbo._OnlineOffline WHERE CharID = @CharID);

SET @JID = (
            
SELECT usert.UserJID FROM SRO_VT_SHARD_INIT.dbo._User as usert
            JOIN SRO_VT_SHARD_INIT
.dbo._Char as chart on usert.CharID chart.CharID
            WHERE chart
.CharID = @CharID
            
);
            
    IF 
not exists (SELECT JID FROM SK_Silk WHERE JID = @JID)
        
BEGIN
            INSERT INTO SK_Silk SELECT 
@JID000
        END
            
    UPDATE SK_Silk
    SET silk_own 
silk_own + (@Silk*@Multiplier)
    
WHERE JID = @JID 
I guess this is buggy cuz all tables are working i get silk @ Online/Offline table it counts the gameplay and adds silk to eSilk.. but no silk is added to SK_Silk nothing is added at this table its empty..

And every thing is added without errors (SQL2008R2)
Any help is Appreciated.
Thank you..
Are you sure the other procedure is executing this other one?
02/11/2014 20:17 KingDollar#4
there is no any problem in this proc check other proc