One little addition I'd suggest - in consts.py you define class to hold return codes. I ran it through simple regexp to obtain this dictionary:
smart_ret = { 0 : "No error",
30001 : "The world is already open",
30002 : "The world is closed, this action cannot be performed",
30003 : "No name has been specified where one is required",
30004 : "The sound file could not be played",
30005 : "The specified trigger name does not exist",
30006 : "Attempt to add a trigger that already exists",
30007 : "The trigger 'match' string cannot be empty",
30008 : "The name of this object is invalid",
30009 : "Script name is not in the script file",
30010 : "The specified alias name does not exist",
30011 : "Attempt to add a alias that already exists",
30012 : "The alias 'match' string cannot be empty",
30013 : "Unable to open requested file",
30014 : "Log file was not open",
30015 : "Log file was already open",
30016 : "Bad write to log file",
30017 : "The specified timer name does not exist",
30018 : "Attempt to add a timer that already exists",
30019 : "Attempt to delete a variable that does not exist",
30020 : "Attempt to use SetCommand with a non-empty command window",
30021 : "Bad regular expression syntax",
30022 : "Time given to AddTimer is invalid",
30023 : "Direction given to AddToMapper is invalid",
30024 : "No items in mapper",
30025 : "Option name not found",
30026 : "New value for option is out of range",
30027 : "Trigger sequence value invalid",
30028 : "Where to send trigger text to is invalid",
30029 : "Trigger label not specified/invalid for 'send to variable'",
30030 : "File name specified for plugin not found",
30031 : "There was a parsing or other problem loading the plugin",
30032 : "Plugin is not allowed to set this option",
30033 : "Plugin is not allowed to get this option",
30034 : "Requested plugin is not installed",
30035 : "Only a plugin can do this",
30036 : "Plugin does not support that subroutine (subroutine not in script)",
30037 : "Plugin does not support saving state",
30037 : "Plugin could not save state (eg. no state directory)",
30039 : "Plugin is currently disabled",
30040 : "Could not call plugin routine",
30041 : "Calls to 'Execute' nested too deeply",
30042 : "Unable to create socket for chat connection",
30043 : "Unable to do DNS (domain name) lookup for chat connection",
30044 : "No chat connections open",
30045 : "Requested chat person not connected",
30046 : "General problem with a parameter to a script call",
30047 : "Already listening for incoming chats",
30048 : "Chat session with that ID not found",
30049 : "Already connected to that server/port",
30050 : "Cannot get (text from the) clipboard",
30051 : "Cannot open the specified file",
30052 : "Already transferring a file",
30053 : "Not transferring a file",
30054 : "There is not a command of that name",
30055 : "That array already exists",
30056 : "That name is not permitted for a key",
30056 : "That array does not exist",
30057 : "Values to be imported into array are not in pairs",
30058 : "Import succeeded, however some values were overwritten",
30059 : "Import/export delimiter must be a single character, other than backslash",
30060 : "Array element set, existing value overwritten",
30061 : "Array key does not exist",
30062 : "Cannot import because cannot find unused temporary character", }
which I find more useful.
There are other things, I'll write about them later. |