SitePoint Sponsor

User Tag List

Page 3 of 3 FirstFirst 123
Results 51 to 56 of 56
  1. #51
    SitePoint Enthusiast
    Join Date
    Feb 2013
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone?

  2. #52
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,018
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hey Doomed,

    The problem at line 11772 is fixed now isn't it?
    Was that fixed with rsPlayer("warid") = abs(iWarid)?

    The new issue seems to be at line 12123?

    In that block of code you posted, this part is going to give you trouble because it's only partly commented out. Every line needs to have a single-quote to comment it out unless you want to only comment out the if conditional and some of the surrounding code:
    Code:
        '    if rsplayer("gameshosted") <> 0 and iMinGamesHosted <> 0 then
            rsplayer("ranking")            = cdbl(rsplayer("gamesplayedranking")) + _
                                             cdbl(rsplayer("victoryrtranking")) + _
                                             cdbl(rsplayer("appgranking")) + _
                                             cdbl(rsplayer("aenptsranking")) + _
                                             cdbl(rsplayer("uppranking"))
    
    
        '    else
        '    rsplayer("ranking")            = cdbl(20)*((20 - rsplayer("gameshosted"))/20) + _
        '                                     cdbl(20)*(rsplayer("gamesplayed")/iMaxGamesPlayed) + _
        '                                     cdbl(20)*(cdbl(iVictoryRT)/cdbl(iMaxVictoryRT)) + _
        '                                     cdbl(20)*(cdbl(iAttritionRT)/cdbl(iMaxAttritionRt)) + _
        '                                    cdbl(20)*(rsPlayer("upp").value/iMaxUPP)
        '    end if
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  3. #53
    SitePoint Enthusiast
    Join Date
    Feb 2013
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by awasson View Post
    Hey Doomed,

    The problem at line 11772 is fixed now isn't it?
    Was that fixed with rsPlayer("warid") = abs(iWarid)?
    I don't know, because regardless what I do I see the other error.... so maybe it's fixed or maybe not. I'm sure I will know it when the new issue has been solved.

    Quote Originally Posted by awasson View Post
    The new issue seems to be at line 12123?

    In that block of code you posted, this part is going to give you trouble because it's only partly commented out. Every line needs to have a single-quote to comment it out unless you want to only comment out the if conditional and some of the surrounding
    I did not comment anything out there. It was originally commented out in the script. Shall I uncomment it?

  4. #54
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,018
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Well, if I remove all of the commented out code and reformat it a bit for clarity this is what you have left:

    Code:
          ' Calculate preliminary rankings
          rsplayer.open "select * from war_rcstats where gamesplayed >=" & iMinGamesReqd & " and warid=" & iWarID, dbconnection, adopenstatic, adlockoptimistic
          
          do until(rsPlayer.EOF)
            iGamesRT   = rsplayer("gamesplayed").value
            iVictoryRT   = rsplayer("victoryrt").value
            iAPPG = rsplayer("appg").value
            iTotUPPRT = rsplayer("upp").value
            iTotAENPTS = rsplayer("aenpts").value
    
         
             if cdbl(iMaxGamesRT) <> cdbl(iMinGamesRT) then
                 rsplayer("gamesplayedranking").value = ((9.00/(cdbl(iMaxGamesRT)-cdbl(iMinGamesRT)))*(cdbl(iGamesRT)-cdbl(iMinGamesRT)))+1
             else
                  rsplayer("gamesplayedranking").value = 10.00
            end if
    
            if cdbl(iMaxVictoryRT) <> cdbl(iMinVictoryRT) then
                rsplayer("victoryrtranking")   = ((24.00/(cdbl(iMaxVictoryRt)-cdbl(iMinVictoryRt)))*(cdbl(iVictoryRT)-cdbl(iMinVictoryRt)))+1
            else
                rsplayer("victoryrtranking")   = 25.00
            end if
    
            if cdbl(iMaxAENPTS) <> cdbl(iMinAENPTS) then
                rsplayer("aenptsranking")   = (24.00-((24.00/(cdbl(iMaxAENPTS)-cdbl(iMinAENPTS)))*(cdbl(iTotAENPTS)-cdbl(iMinAENPTS))))+1
            else
                rsplayer("aenptsranking")   = 25.00
            end if
    
             if cdbl(iMaxAPPG) <> cdbl(iMinAPPG) then
                rsplayer("appgranking")   = ((24.00/(cdbl(iMaxAPPG)-cdbl(iMinAPPG)))*(cdbl(iAPPG)-cdbl(iMinAPPG)))+1
            else
                rsplayer("appgranking")   = 25.00
            end if
        
            if cdbl(iMaxUPP) <> cdbl(iMinUPP) then
                rsplayer("uppranking")   = ((14.00/(cdbl(iMaxUPP)-cdbl(iMinUPP)))*(cdbl(iTotUPPRT)-cdbl(iMinUPP)))+1
            else
                rsplayer("uppranking") = 15.00
            end if
    
        
            rsplayer("ranking")            = cdbl(rsplayer("gamesplayedranking")) + _
                                         cdbl(rsplayer("victoryrtranking")) + _
                                         cdbl(rsplayer("appgranking")) + _
                                         cdbl(rsplayer("aenptsranking")) + _
                                         cdbl(rsplayer("uppranking"))
    
            rsPlayer.Update
            rsplayer.movenext
            loop
        rsPlayer.Close
    I would run that code and see where the error lies.
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  5. #55
    SitePoint Enthusiast
    Join Date
    Feb 2013
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still same error at 'rsPlayer.Update'.

  6. #56
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,018
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DoomedVash View Post
    Still same error at 'rsPlayer.Update'.
    Yeah, I knew it would. I haven't changed anything but that code block will be easier to troubleshoot without all the commented out junk.

    I would start by commenting out rsPlayer.Update (to stop it from erroring) and Response.Write out a bunch of the variables in that block to see what's going on.
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •