So what exactly is your problem ?
BEGIN SET @LowestOJType = (SELECT StatName FROM @NewAllOJs WHERE Stats = (SELECT MIN(Stats) FROM @NewAllOJs WHERE Stats > 0)) -- Getting the lowest stat. IF @LowestOJType = 'Str' SET @NewStr = 0 ELSE IF @LowestOJType = 'Dex' SET @NewDex = 0 ELSE IF @LowestOJType = 'Rec' SET @NewRec = 0 ELSE IF @LowestOJType = 'Int' SET @NewInt = 0 ELSE IF @LowestOJType = 'Wis' SET @NewWis = 0 ELSE IF @LowestOJType = 'Luc' SET @NewLuc = 0 ELSE IF @LowestOJType = 'HP' SET @NewHP = 0 ELSE IF @LowestOJType = 'MP' SET @NewMP = 0 ELSE IF @LowestOJType = 'SP' SET @NewSP = 0 -- Whichever the lowest stat is, it is changed to 0. END
I guess I missed that one while coding it.Quote:
We have a problem on our server....
This request the lowest OJCode:BEGIN SET @LowestOJType = (SELECT StatName FROM @NewAllOJs WHERE Stats = (SELECT MIN(Stats) FROM @NewAllOJs WHERE Stats > 0)) -- Getting the lowest stat. IF @LowestOJType = 'Str' SET @NewStr = 0 ELSE IF @LowestOJType = 'Dex' SET @NewDex = 0 ELSE IF @LowestOJType = 'Rec' SET @NewRec = 0 ELSE IF @LowestOJType = 'Int' SET @NewInt = 0 ELSE IF @LowestOJType = 'Wis' SET @NewWis = 0 ELSE IF @LowestOJType = 'Luc' SET @NewLuc = 0 ELSE IF @LowestOJType = 'HP' SET @NewHP = 0 ELSE IF @LowestOJType = 'MP' SET @NewMP = 0 ELSE IF @LowestOJType = 'SP' SET @NewSP = 0 -- Whichever the lowest stat is, it is changed to 0. END
1) Max Stat is 45 (on our Server)
Example:
A player have a helmet with 45 STR, 5 REC, 5 LUC
The query will result 5 REC and 5 LUC == Player get disconnected (Because there are 2 results)
Any idea what we can do ? And i wondering why no one else have this problem..
DECLARE @QuestID INT = (SELECT QuestID FROM inserted)