in

Community Server

The platform that enables you to build rich, interactive communities

Locked Games

Last post 04-19-2012 6:58 AM by Stutgrtguy. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 02-01-2012 12:52 PM

    Locked Games

    Is it possible to allow picks to be made right up unil the game starts rather than locking all of the Sunday and Monday games on Sunday morning?  This would be a great feature to be developed before the start of the 2012 season. Anyone else interested?

    Filed under:
  • 03-09-2012 7:28 AM In reply to

    Re: Locked Games

    Bump
  • 03-11-2012 9:32 PM In reply to

    • AnnMarlyn
    • Top 200 Contributor
    • Joined on 03-12-2012
    • 9475 Pony Lake Rd NW, Bemidji, MN 56601
    • Posts 1

    Re: Locked Games

     Yeah. Even i am interested. Wanna know some more details regarding it.

     

    pop art

  • 03-12-2012 12:57 PM In reply to

    Re: Locked Games

    I made a change to the /includes/common.asp file so that the week will not lock unitl all of the games are locked.  This way users can make picks up until the start of the game, and all of the games will not lock at the start of the first game on Sunday morning.

     function IsWeekLocked(week)

      dim dateTime, rs, gameDateTime, numGames, GamesComplete
      
      numGames = GetGameCount(week)
      GamesComplete = 0

      IsWeekLocked = false
      dateTime = GetCurrentDateTime()
      set rs = GetGamesRecordset(week)
      do while not rs.EOF
       gameDateTime = CDate(rs.Fields("DateTime").Value)
       if gameDateTime <= dateTime then
        GamesComplete = GamesComplete + 1
       end if
       rs.MoveNext
      loop
      
      if GamesComplete = numGames then
       IsWeekLocked = true
      end if

     end function

    Anyone see an issue of doing it this way??

  • 03-26-2012 1:59 PM In reply to

    Re: Locked Games

    I set the Database to show games for today, and set different times for some games to test this. this was what I got on the pick page.

    ADODB.Recordset

    error '800a0cc1'

    Item cannot be found in the collection corresponding to the requested name or ordinal.

    /pool/includes/common.asp, line 511

    I believe line 511 is  - "GamesComplete = 0"

  • 03-26-2012 2:15 PM In reply to

    Re: Locked Games

    I apologize, I should have stated before posting my code that this is for a SQL Server implementation, not Access.  If you are using an Access database, the following line should not be changed:

    gameDateTime = CDate(rs.Fields("DateTime").Value)

    The code is different  when reading the date and time from Access.  I don't have the old code to post here, but you should be able to find another example somewhere in the pool code.  Sorry for the confusion.

  • 04-01-2012 2:20 AM In reply to

    Re: Locked Games

    no worries, but thanks for the heads up, and the nod in the right direction.

    I think Ive solved it for the Access version. Oddly enough I only had to change one word.

    Looks like everything works just fine, games lock at the specified game times.

    original =

    if Weekday(gameDateTime) = vbSunday and gameDateTime <= dateTime then  

    New =

    if Weekday(gameDateTime) = vbTuesday and gameDateTime <= dateTime then

  • 04-13-2012 12:15 AM In reply to

    Re: Locked Games

     This games are going to be fantastic and i would like to know more about it  in future.

     

     

     

    how to pass a drug test 

  • 04-17-2012 9:09 AM In reply to

    Re: Locked Games

    What's to keep your pool players from changing their picks on games that have already been played if they're not locked out until Tuesday? Everyone will have perfect scores.
  • 04-19-2012 6:58 AM In reply to

    Re: Locked Games

    Ive already ran tests, each game locks at the time its set to kickoff. I tested it on wednesday games through late monday night games, all at different start times, as each gametime was reached it locked. No one can change any picks.

    All this did by changing it to tuesday was basically make all games before Tuesday "early games" where the code is concerned. Before this change any games begining before sunday were considered an early game by code.

    I could change it to monday, but when theres the odd date with 2 games on monday it will lock them both once the first game begins. So to avoid any confusion with my players I just set them all to lock at their kickoff time.

Page 1 of 1 (10 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems