219 Open Daily games
0 Open Realtime games
    Pages:   1   (1 in total)
  1. #1 / 3
    Premium Member yousillyGoose
    Rank
    Private
    Rank Posn
    Unranked
    Join Date
    May 17
    Location
    Posts
    13

    Hey,

     

    I see inconsistent responses in the GetGamesList API. Specifically, for Live games it returns players as a map of 'Index':'Player', and for games which haven't yet started, it returns an array of players.

     

    I assume this should *always* return an array rather than the map, but being inconsistent is pretty hard to work around. Any advice?


  2. #2 / 3
    Commander In Chief tom tom is offline now
    WarGear Admin tom
    Rank
    Commander In Chief
    Rank Posn
    #761
    Join Date
    Jun 09
    Location
    Posts
    5651

    hi there - the reason is that for Live games, the player's seat has been allocated so the array map number refers to their seat.

    For games which haven't started yet, the seat hasn't been allocated yet hence it's returned as a simple array.

    This all dates back to a design from 10 or so years ago which hasn't been updated in some time; if it's truly something that you can't work around I can take a look at changing this behavior for you.


  3. #3 / 3
    Premium Member yousillyGoose
    Rank
    Private
    Rank Posn
    Unranked
    Join Date
    May 17
    Location
    Posts
    13

    I worked around it by lazily parsing the values. No need to fix, but I was more flagging in case it was an issue.  


You need to log in to reply to this thread   Login | Join
 
Pages:   1   (1 in total)