Skip to content

Commit

Permalink
Cleaned errorcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
benlowry committed May 18, 2013
1 parent 0ae6193 commit ba7c935
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/playtomic/as3/Response.as
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package com.playtomic.as3 { public class Response extends Object { private static const ERRORS:Object = new Object(); // General Errors ERRORS[0] = "Nothing went wrong!"; ERRORS[1] = "General error, this typically means the player is unable to connect to the server."; ERRORS[2] = "Invalid game credentials. Make sure you use the right public and private keys."; ERRORS[3] = "Request timed out."; ERRORS[4] = "Invalid request."; // GeoIP Errors ERRORS[100] = "GeoIP API has been disabled for this game."; // Leaderboard Errors ERRORS[200] = "Leaderboard API has been disabled for this game."; ERRORS[201] = "The player's name wasn't provided."; ERRORS[203] = "Player is banned from submitting scores in your game."; ERRORS[204] = "Score was not saved because it was not the player's best. You can allow players to have more than one score by specifying allowduplicates=true in your save options."; // GameVars Errors ERRORS[300] = "GameVars API has been disabled for this game."; // LevelSharing Errors ERRORS[400] = "Level sharing API has been disabled for this game.", ERRORS[401] = "Invalid rating value (must be 1 - 10).", ERRORS[402] = "Player has already rated that level.", ERRORS[403] = "Missing level name", ERRORS[404] = "Missing level id.", ERRORS[405] = "Level already exists." public var success:Boolean = false; public var errorcode:int = 0; /** * Creates a response * @param status The status returned from the server * @param errorcode The errorcode returned from the server */ public function Response(s:Boolean, e:int){ success = s; errorcode = e; } /** * Returns the error message for a number */ public function get errorMessage():String{ return ERRORS[errorcode]; } }}
package com.playtomic.as3 { public class Response extends Object { private static const ERRORS:Object = new Object(); // General Errors ERRORS[0] = "Nothing went wrong!"; ERRORS[1] = "General error, this typically means the player is unable to connect to the server."; ERRORS[2] = "Invalid game credentials. Make sure you use the right public and private keys."; ERRORS[3] = "Request timed out."; ERRORS[4] = "Invalid request."; // GeoIP Errors ERRORS[100] = "GeoIP API has been disabled for this game."; // Leaderboard Errors ERRORS[200] = "Leaderboard API has been disabled for this game."; ERRORS[201] = "The player's name wasn't provided."; ERRORS[203] = "Player is banned from submitting scores in this game."; ERRORS[204] = "Score was not saved because it was not the player's best. You can allow players to have more than one score by specifying allowduplicates=true in your save options."; // GameVars Errors ERRORS[300] = "GameVars API has been disabled for this game."; // LevelSharing Errors ERRORS[400] = "Level sharing API has been disabled for this game.", ERRORS[401] = "Invalid rating value (must be 1 - 10).", ERRORS[402] = "Player has already rated that level.", ERRORS[403] = "Missing level name", ERRORS[404] = "Missing level id.", ERRORS[405] = "Level already exists." public var success:Boolean = false; public var errorcode:int = 0; /** * Creates a response * @param status The status returned from the server * @param errorcode The errorcode returned from the server */ public function Response(s:Boolean, e:int){ success = s; errorcode = e; } /** * Returns the error message for a number */ public function get errorMessage():String{ return ERRORS[errorcode]; } }}
Expand Down

0 comments on commit ba7c935

Please sign in to comment.