Hello :) , i'm wondering why when i get some honor points and i restart my mainserver , these honors go , does it need something else to add in db ? table or so?
Hello :) , i'm wondering why when i get some honor points and i restart my mainserver , these honors go , does it need something else to add in db ? table or so?
You have done the stored?
- - - Updated - - -
CREATE PROCEDURE H
AS
DECLARE @name varchar(14)
DECLARE @Assa varchar(14)
DECLARE @Index int
DECLARE @honor int
DECLARE @namelvl int
DECLARE @Assalvl int
DECLARE @lvldif int
DECLARE @PID int
Set @Index = (select max([Index]) FROM PKBulletin)
Set @name = (select [NameCatch] FROM PKBulletin WHERE [Index] = @Index)
Set @Assa = (select [NameAssassin] FROM PKBulletin WHERE [Index] = @Index)
Set @PID = (select [PID] FROM Player where [Name] = @name)
Set @namelvl = (select [Level] FROM Player where [Name] = @name)
Set @Assalvl = (select [Level] FROM Player where [Name] = @Assa)
Set @honor = (select [Honor] FROM Player WHERE [PID] = @PID)
Set @lvldif = @Assalvl - @namelvl
IF @honor = Null) --Ersetze falls nِtig NULL mit 0
begin
Set @honor = 0
end
--Honor je nach Levelunterschied
IF @namelvl > @Assalvl) --Lvl niedriger
begin
Set @honor = @honor + 1
end
ELSE IF @namelvl = @Assalvl) --Lvl gleich
begin
Set @honor = @honor + 2
end
ELSE IF (@Assalvl > @namelvl) --Lvl hِher
begin
IF (@lvldif >= 1 AND @lvldif <= 5) --1 bis 5 Lvl hِher
begin
Set @honor = @honor + 3
end
ELSE IF (@lvldif >= 6 AND @lvldif <= 10) --6 bis 10 Lvl hِher
begin
Set @honor = @honor + 4
end
ELSE IF (@lvldif >= 11) --11 oder mehr Lvl hِher
begin
Set @honor = @honor + 5
end
end
IF EXISTS (select [Name] FROM Player where [Name] = @name)
begin
UPDATE Player SET [Honor] = @honor WHERE [Name] = @name
DELETE FROM PKBulletin WHERE [Index] = @Index
end
this works with new engine ( V ) ?
- - - Updated - - -
it gives me errors
Msg 207, Level 16, State 1, Procedure H, Line 21
Invalid column name 'Honor'.
Msg 207, Level 16, State 1, Procedure H, Line 0
Invalid column name 'Honor'.
if im right you dont have the Honor Table in dbo.Player (?)
@blub95 exactly right , fixed thanks :)