summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorAnnieRuru <jeankof@ymail.com>2015-12-23 18:05:43 +0800
committerHaru <haru@dotalux.com>2016-01-05 20:33:56 +0100
commita70f77c15946b419af2f33c9d6986fc351e54f5e (patch)
treec599f1d0410ba1edc7baf497fdd31fab0c642b26 /doc/script_commands.txt
parentabb6bb0c917031ad3c215b40a19bbf31f7bcd720 (diff)
downloadhercules-a70f77c15946b419af2f33c9d6986fc351e54f5e.tar.gz
hercules-a70f77c15946b419af2f33c9d6986fc351e54f5e.tar.bz2
hercules-a70f77c15946b419af2f33c9d6986fc351e54f5e.tar.xz
hercules-a70f77c15946b419af2f33c9d6986fc351e54f5e.zip
Add *swap script command
- extremely useful when writing algorithm functions Closes #1012 as merged Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index e5663f7bf..cb7ded9df 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -7779,6 +7779,19 @@ Example:
---------------------------------------
+*swap <variable>,<variable>;
+
+Swap the value of 2 variables. Both sides must be same integer or string type.
+
+Example:
+ .@var1 = 111;
+ .@var2 = 222;
+ swap .@var1, .@var2;
+ mes "var1 = "+ .@var1; // return 222
+ mes "var2 = "+ .@var2; // return 111
+
+---------------------------------------
+
*query_sql("your MySQL query"{, <array variable>{, <array variable>{, ...}}});
*query_logsql("your MySQL query"{, <array variable>{, <array variable>{, ...}}});