Laser Squad Nemesis Tournament Administrator System |
|
|
INITIATING A GAMECALLING THE START GAME URLTo start a game, call the following url with the correct data (best using the post method): http://codo-linux1.bytemark.co.uk/GameAdmin/StartGame The http response will contain xml data reporting the outcome of the request. It is essential that your program checks this xml data in case there are errors arising from your request. Parameters you must supply to the game start URL are: admin_id Your tournament administrator id number. THE HTTP RESPONSEWhen you call the game start urlyou will get an xml error report in the HTTP response. You must check this response to make sure the game has been started, because there are many reasons why a game start will fail, and your system needs to take appropriate action. The response will also contain the game id for a successfully started game, which you must use to track the results of the game when it is finished. If you are using IE you can see an example of the xml response (albeit mostly errors!). Here is an explanation of how to process the response. The top level xml group for group is <new_game_status>. The first variable to check is errors. If this is ‘0’, then the game has started properly. You must then record the variable game_id in your database so you can track the outcome of your game. If errors is greater than zero, then there has been a problem with the game start and you need to find out why and take appropriate action. Each variable in the xml response will be ‘OK’ if there was no error, otherwise the string will begin with ‘error:’ followed by an explanation of the error, and then the value that you originally supplied. Here is an explanation of all the error reports: admin_id error: incorrect admin_id: The first error you must check is ‘admin_id’. If this is not ‘OK’ then there will be no further error reports. ip_check error: unauthorised IP address If admin_id is OK, then the IP address you are calling from is checked to see if it is the same as the one recorded in the admin database. This is an important security check, so you must make us aware of any changes to your IP address. These scenario parameter errors are fairly self-explanatory: response_deadline error: response deadline not in range
1-14 Then there is an error report for each player under the xml grouping <game_player> player_num '1' for player one, '2' for player two.
|