Leaderboards

Results 1 to 12 of 12
  1. #1
    Android Developer doidloko is offline
    MemberRank
    Aug 2012 Join Date
    BrasilLocation
    253Posts

    happy Leaderboards

    hi how can i make leaderboards work ?
    i m using alpha source + updates 1 2 3 4 5
    have the tables in db but is empity o.o
    i need set manual or system make it automatic ?

    what i make *-*


  2. #2
    Valued Member momk100 is offline
    MemberRank
    Apr 2013 Join Date
    United statesLocation
    122Posts

    Re: Leaderboards

    since you are using the community release you should already have the leaderboards working. They should update automatically

  3. #3
    Android Developer doidloko is offline
    MemberRank
    Aug 2012 Join Date
    BrasilLocation
    253Posts

    Re: Leaderboards

    yes i m using but leaderboard is empity tables in warz database too

  4. #4
    Valued Member momk100 is offline
    MemberRank
    Apr 2013 Join Date
    United statesLocation
    122Posts

    Re: Leaderboards

    did u kill any zombies or anything

  5. #5
    Android Developer doidloko is offline
    MemberRank
    Aug 2012 Join Date
    BrasilLocation
    253Posts

    Re: Leaderboards

    No have 30+ player plaing for day and dont have any players in leaderboard

  6. #6
    Developer DNC is offline
    DeveloperRank
    Oct 2011 Join Date
    2,493Posts

    Re: Leaderboards

    "No have 30+ player plaing for day and dont have any players in leaderboard" <-- notice day
    7 day leaderboard
    30 day leaderboard
    etc etc
    ;)

  7. #7
    Android Developer doidloko is offline
    MemberRank
    Aug 2012 Join Date
    BrasilLocation
    253Posts

    Re: Leaderboards

    1.jpg2.jpgscreen_06042013_163924.jpgscreen_06042013_163927.jpgscreen_06042013_163929.jpg


    and have players db user data have 40+
    in user chars have 316

  8. #8
    Enthusiast devmodeon is offline
    MemberRank
    Apr 2013 Join Date
    42Posts

    Re: Leaderboards

    Those Leaderboards in the database are supposed to be empty. I suspect something you edited broke it.

  9. #9
    Android Developer doidloko is offline
    MemberRank
    Aug 2012 Join Date
    BrasilLocation
    253Posts

    Re: Leaderboards

    -- ----------------------------
    -- Procedure structure for [WZ_LeaderboardGet]
    -- ----------------------------

    ALTER PROCEDURE [dbo].[WZ_LeaderboardGet]
    @in_Hardcore int,
    @in_Type int,
    @in_Page int
    AS
    BEGIN
    SET NOCOUNT ON;

    -- this call is always success
    SELECT 0 AS ResultCode

    DECLARE @rowsPerPage FLOAT = 100.0
    DECLARE @rowLimit INT = 2000;
    DECLARE @startPos INT = (@in_Page - 1) * @rowsPerPage

    IF @in_Type = 5 -- Heroes
    BEGIN
    SELECT TOP (@rowLimit) (@startPos + 1) AS StartPos,
    CEILING(COUNT(*) / @rowsPerPage) AS PageCount
    FROM UsersChars
    WHERE Hardcore = @in_Hardcore AND Reputation >= 0

    ;WITH LeaderboardData AS
    (
    SELECT TOP (@rowLimit) Gamertag, Alive, Reputation AS Data,
    ROW_NUMBER() OVER
    (ORDER BY Reputation DESC) AS Pos
    FROM UsersChars
    WHERE Hardcore = @in_Hardcore AND Reputation >= 0
    )
    SELECT Gamertag, Alive, Data
    FROM LeaderboardData
    WHERE Pos > @startPos AND Pos <= @startPos + @rowsPerPage
    END
    ELSE IF @in_Type = 6 -- Villains
    BEGIN
    SELECT TOP (@rowLimit) (@startPos + 1) AS StartPos,
    CEILING(COUNT(*) / @rowsPerPage) AS PageCount
    FROM UsersChars
    WHERE Hardcore = @in_Hardcore AND Reputation < 0

    ;WITH LeaderboardData AS
    (
    SELECT TOP (@rowLimit) Gamertag, Alive, Reputation AS Data,
    ROW_NUMBER() OVER
    (ORDER BY Reputation) AS Pos
    FROM UsersChars
    WHERE Hardcore = @in_Hardcore AND Reputation < 0
    )
    SELECT Gamertag, Alive, Data
    FROM LeaderboardData
    WHERE Pos > @startPos AND Pos <= @startPos + @rowsPerPage
    END
    ELSE
    BEGIN
    SELECT TOP (@rowLimit) (@startPos + 1) AS StartPos,
    CEILING(COUNT(*) / @rowsPerPage) AS PageCount
    FROM UsersChars
    WHERE Hardcore = @in_Hardcore

    ;WITH LeaderboardData AS
    (
    SELECT TOP (@rowLimit) Gamertag, Alive,
    CASE @in_Type
    WHEN 0 THEN XP
    WHEN 1 THEN TimePlayed
    WHEN 2 THEN Stat00 -- KilledZombies
    WHEN 3 THEN Stat01 -- KilledSurvivors
    WHEN 4 THEN Stat02 -- KilledBandits
    WHEN 5 THEN Reputation
    WHEN 6 THEN Reputation
    ELSE 0
    END AS Data,
    ROW_NUMBER() OVER
    (ORDER BY
    CASE WHEN @in_Type = 0 THEN XP END DESC,
    CASE WHEN @in_Type = 1 THEN TimePlayed END DESC,
    CASE WHEN @in_Type = 2 THEN Stat00 END DESC,
    CASE WHEN @in_Type = 3 THEN Stat01 END DESC,
    CASE WHEN @in_Type = 4 THEN Stat02 END DESC,
    CASE WHEN @in_Type = 5 THEN Reputation END DESC,
    CASE WHEN @in_Type = 6 THEN Reputation END) AS Pos
    FROM UsersChars
    WHERE Hardcore = @in_Hardcore
    )
    SELECT Gamertag, Alive, Data
    FROM LeaderboardData
    WHERE Pos > @startPos AND Pos <= @startPos + @rowsPerPage
    END

    END

  10. #10
    Enthusiast devmodeon is offline
    MemberRank
    Apr 2013 Join Date
    42Posts

    Re: Leaderboards

    Sorry is this a question or answer?

  11. #11
    Android Developer doidloko is offline
    MemberRank
    Aug 2012 Join Date
    BrasilLocation
    253Posts

    Re: Leaderboards

    question xD IT IS MY LeaderboardGet FUNCTION *-*

  12. #12
    Developer DNC is offline
    DeveloperRank
    Oct 2011 Join Date
    2,493Posts

    Re: Leaderboards

    Which broke it -.-



Advertisement