1
0
mirror of https://gitlab.com/Deukhoofd/BattleSim.git synced 2025-09-02 00:47:19 +00:00
BattleSim/shared/errors.coffee
2016-02-01 23:19:30 +01:00

14 lines
275 B
CoffeeScript

self = (module?.exports || window.PokeBattle.errors = {})
errors = """
FIND_BATTLE
BATTLE_DNE
INVALID_SESSION
BANNED
COMMAND_ERROR
PRIVATE_MESSAGE
INVALID_ALT_NAME
"""
for error, i in errors.trim().split(/\s+/)
self[error] = (i + 1) # Let's not start at 0, just in case.