diff options
author | Emistry Haoyan <equinox1991@gmail.com> | 2019-04-13 16:28:16 +0800 |
---|---|---|
committer | Emistry Haoyan <equinox1991@gmail.com> | 2019-04-29 00:44:32 +0800 |
commit | 9f6ffd2f9aae9c39eb2fe2be2c60cfd45c18842a (patch) | |
tree | 64900c78ff3328e0359a84e7ebe682cad6ffcc0f /npc/dev | |
parent | ab81d4012eac5c2c00c485971fc9b89bf69761be (diff) | |
download | hercules-9f6ffd2f9aae9c39eb2fe2be2c60cfd45c18842a.tar.gz hercules-9f6ffd2f9aae9c39eb2fe2be2c60cfd45c18842a.tar.bz2 hercules-9f6ffd2f9aae9c39eb2fe2be2c60cfd45c18842a.tar.xz hercules-9f6ffd2f9aae9c39eb2fe2be2c60cfd45c18842a.zip |
Added *consolemes script command
- deprecated `*debugmes` script command.
- added `*consolemes` script command which display the console message based on `type`.
- allow map-server console to auto logging into text file depend on type of message.
Diffstat (limited to 'npc/dev')
-rw-r--r-- | npc/dev/test.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/npc/dev/test.txt b/npc/dev/test.txt index 2822ee65c..a867a09b2 100644 --- a/npc/dev/test.txt +++ b/npc/dev/test.txt @@ -786,10 +786,10 @@ function script HerculesSelfTestHelper { callsub(OnCheck, "data_to_string (integer variable)", data_to_string(.@x), ".@x"); if (.errors) { - debugmes "Script engine self-test [ \033[0;31mFAILED\033[0m ]"; - debugmes "**** The test was completed with " + .errors + " errors. ****"; + consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;31mFAILED\033[0m ]"); + consolemes(CONSOLEMES_DEBUG, "**** The test was completed with " + .errors + " errors. ****"); } else { - debugmes "Script engine self-test [ \033[0;32mPASSED\033[0m ]"; + consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;32mPASSED\033[0m ]"); } return .errors; end; @@ -840,8 +840,8 @@ OnReportError: .@val$ = getarg(1,""); .@ref$ = getarg(2,""); if (.errors == 1) - debugmes "**** WARNING: Any self-test results past this point are unreliable because of previous errors. ****"; - debugmes "Error: "+.@msg$+": '"+.@val$+"' (found) != '"+.@ref$+"' (expected)"; + consolemes(CONSOLEMES_DEBUG, "**** WARNING: Any self-test results past this point are unreliable because of previous errors. ****"); + consolemes(CONSOLEMES_DEBUG, "Error: "+.@msg$+": '"+.@val$+"' (found) != '"+.@ref$+"' (expected)"); ++.errors; //end; return; |