diff options
author | Haru <haru@dotalux.com> | 2013-11-10 05:22:30 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-11-10 05:22:30 +0100 |
commit | dd05ae388d69e7df1dffcd393cea5e4cdc605e75 (patch) | |
tree | ac7454f83fb9d4e2adee0fed59c97c95e569da49 /src/map/script.h | |
parent | f7f10cf7bb600b6871ed37f493fef18110dc182b (diff) | |
download | hercules-dd05ae388d69e7df1dffcd393cea5e4cdc605e75.tar.gz hercules-dd05ae388d69e7df1dffcd393cea5e4cdc605e75.tar.bz2 hercules-dd05ae388d69e7df1dffcd393cea5e4cdc605e75.tar.xz hercules-dd05ae388d69e7df1dffcd393cea5e4cdc605e75.zip |
Added deprecation messages for incorrect capitalization in scripts
- These messages are temporary, only meant to help those with custom
scripts to transition them to the correct case-sensitive syntax. If
you ignore the deprecation messages you encounter, your scripts may
continue to work just as they did until now, but this will no longer
be true in the near future, and they may stop working at any time.
If you ignore this, and your scripts break, you'll get to keep the
pieces :)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.h')
-rw-r--r-- | src/map/script.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/script.h b/src/map/script.h index 7fa8b92e4..bcc524401 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -20,6 +20,12 @@ struct eri; /** * Defines **/ +// TODO: Remove temporary code +#define ENABLE_CASE_CHECK +#define DeprecationWarning(func, bad, good, file, line) ShowWarning("%s: use of deprecated keyword '%s' (use '%s' instead) in file '%s', line '%d'. This will be a critical error in a near future.\n", func, bad, good, file, line); +#define DeprecationWarning2(func, bad, good, where) ShowWarning("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s'). If it is a local (.@) variable, and you're absolutely sure you used the correct case, please disragard this message, otherwise please correct your scripts, as this will become fatal in a near future.\n", func, bad, good, where); +#define disp_deprecation_message(func, good, p) disp_warning_message(func": use of deprecated keyword (use '"good"' instead). This will be a critical error in a near future.", p); + #define NUM_WHISPER_VAR 10 /// Maximum amount of elements in script arrays (soon getting ducked) |