summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-08-24 23:32:41 +0200
committerGitHub <noreply@github.com>2018-08-24 23:32:41 +0200
commitbf6b8a0ccfb3f0b35aec9b0ae833327ab5cbf405 (patch)
treee333b62318df2c0ed55ffc571ae83321e620909c /doc/script_commands.txt
parentcc25a7c300ab2f549d4f2760eafb0baaf7e032d5 (diff)
parent5b62115128f5836d692b9b0305950a5ef7393306 (diff)
downloadhercules-bf6b8a0ccfb3f0b35aec9b0ae833327ab5cbf405.tar.gz
hercules-bf6b8a0ccfb3f0b35aec9b0ae833327ab5cbf405.tar.bz2
hercules-bf6b8a0ccfb3f0b35aec9b0ae833327ab5cbf405.tar.xz
hercules-bf6b8a0ccfb3f0b35aec9b0ae833327ab5cbf405.zip
Merge pull request #2146 from mekolat/debugmes
bake sprintf into debugmes
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index c5c58b991..4c5dab969 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -7679,15 +7679,19 @@ solution rather than sending the map and the monster_id.
//=====================================
---------------------------------------
-*debugmes("<message>")
+*debugmes("<format string>"{, <param>{, ...}})
+
+This command will print a message in the server console (map-server window),
+after applying the same format-string replacements as sprintf(). It will not be
+displayed anywhere else. Returns true on success.
+
+Example:
-This command will send the message to the server console (map-server
-window). It will not be displayed anywhere else.
-//
// Displays "NAME has clicked me!" in the map-server window.
- debugmes(strcharinfo(PC_NAME)+" has clicked me!");
+ debugmes("%s has clicked me!", strcharinfo(PC_NAME));
+
+ debugmes("\033[0;32mHello World"); // supports ANSI escape sequences
- debugmes("\033[38D\033[K ==Message== \n"); // enable colour code.
---------------------------------------
*logmes("<message>"{, <log type>})