Honor points aren't saved

Results 1 to 5 of 5
  1. #1
    Account Upgraded | Title Enabled! GallantS is offline
    MemberRank
    May 2015 Join Date
    448Posts

    Honor points aren't saved

    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?


  2. #2
    Account Upgraded | Title Enabled! CompaQ is offline
    MemberRank
    Sep 2013 Join Date
    433Posts

    Re: Honor points aren't saved

    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

  3. #3
    Account Upgraded | Title Enabled! GallantS is offline
    MemberRank
    May 2015 Join Date
    448Posts

    Re: Honor points aren't saved

    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'.


  4. #4
    Account Upgraded | Title Enabled! blub95 is offline
    MemberRank
    Oct 2012 Join Date
    Germany :PLocation
    283Posts

    Re: Honor points aren't saved

    if im right you dont have the Honor Table in dbo.Player (?)

  5. #5
    Account Upgraded | Title Enabled! GallantS is offline
    MemberRank
    May 2015 Join Date
    448Posts

    Re: Honor points aren't saved

    @blub95 exactly right , fixed thanks :)



Advertisement