summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-06-15 21:26:17 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-06-15 21:26:17 +0000
commitc934f78758e20244ef669b764e54659bfcd81b9e (patch)
treea294fbb3fbc01dbf39e66691e7f5e3059069f724 /doc/script_commands.txt
parent6a71384339ee2f4c194dd6afcddd14374dba95ec (diff)
downloadhercules-c934f78758e20244ef669b764e54659bfcd81b9e.tar.gz
hercules-c934f78758e20244ef669b764e54659bfcd81b9e.tar.bz2
hercules-c934f78758e20244ef669b764e54659bfcd81b9e.tar.xz
hercules-c934f78758e20244ef669b764e54659bfcd81b9e.zip
* Fixed script command sc_end not supporting the extra argument as stated in script_commands.txt.
* Script command getarg supports an extra argument with a default value that is returned if the requested argument doesn't exist. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10773 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 15fad965a..9c9b75fb0 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -1402,7 +1402,7 @@ script.
---------------------------------------
-*getarg(<number>)
+*getarg(<index>{,<default_value>})
This function is used when you use the 'callsub' or 'callfunc' commands. In the
call you can specify variables that will make that call different from another
@@ -1446,6 +1446,13 @@ You can pass multiple arguments in a function call:
getarg(0) would be 5, getarg(1) would be 4 and getarg(2) would be 3.
+Getarg has an optional argument since trunk r10773.
+If the target argument exists, it is returned.
+Otherwise, if <default_value> is present it is returned instead,
+if not the script terminates immediately.
+
+in the previous example getarg(2,-1) would be 3 and getarg(3,-1) would be -1
+
---------------------------------------
*return {<value>};