Browse Source

- Fixed some spelling errors in /doc/script_commands.txt

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17175 54d463be-8e91-2dee-dedb-b68131a5f0ec
brianluau 12 years ago
parent
commit
2886a2b39a
1 changed files with 26 additions and 25 deletions
  1. 26 25
      doc/script_commands.txt

+ 26 - 25
doc/script_commands.txt

@@ -5090,7 +5090,7 @@ everything not equippable by the new job class anyway.
 *sit {"<character name>"};
 *sit {"<character name>"};
 *stand {"<character name>"};
 *stand {"<character name>"};
 
 
-These commands will make a character sit if standing and stanf if sitting.
+These commands will make a character sit if standing and stand if sitting.
 If no character is specified, the command will run for the invoking character.
 If no character is specified, the command will run for the invoking character.
 
 
 ---------------------------------------
 ---------------------------------------
@@ -6825,46 +6825,47 @@ The first letter is position 0.
 *charat(<string>,<index>)
 *charat(<string>,<index>)
 
 
 Returns char at specified index. If index is out of range, returns empty string.
 Returns char at specified index. If index is out of range, returns empty string.
-	
+The first letter of a string is index 0.
+
 Example:
 Example:
 	
 	
 	charat("This is a string", 10); //returns "s"
 	charat("This is a string", 10); //returns "s"
-	
+
 ---------------------------------------
 ---------------------------------------
-	
+
 *setchar(<string>,<char>,<index>)
 *setchar(<string>,<char>,<index>)
 
 
 Returns the original string with the char at the specified index set to the
 Returns the original string with the char at the specified index set to the
 specified char. If index out of range, the original string will be returned.
 specified char. If index out of range, the original string will be returned.
 Only the 1st char in the <char> parameter will be used.
 Only the 1st char in the <char> parameter will be used.
-	
+
 Example:
 Example:
 	
 	
 	setchar("Cat", "B", 0); //returns "Bat"
 	setchar("Cat", "B", 0); //returns "Bat"
-	
+
 ---------------------------------------
 ---------------------------------------
 
 
 *insertchar(<string>,<char>,<index>)
 *insertchar(<string>,<char>,<index>)
-	
+
 Returns the original string with the specified char inserted at the specified
 Returns the original string with the specified char inserted at the specified
 index. If index is out of range, the char will be inserted on the end of the
 index. If index is out of range, the char will be inserted on the end of the
 string that it is closest. Only the 1st char in the <char> parameter will be used.
 string that it is closest. Only the 1st char in the <char> parameter will be used.
-	
+
 Example:
 Example:
 	
 	
 	insertchar("laughter", "s", 0); //returns "slaughter"
 	insertchar("laughter", "s", 0); //returns "slaughter"
-	
+
 ---------------------------------------
 ---------------------------------------
 
 
 *delchar(<string>,<index>)
 *delchar(<string>,<index>)
 
 
 Returns the original string with the char at the specified index removed.
 Returns the original string with the char at the specified index removed.
 If index is out of range, original string will be returned.
 If index is out of range, original string will be returned.
-	
+
 Example:
 Example:
 	
 	
 	delchar("Diet", 3); //returns "Die"
 	delchar("Diet", 3); //returns "Die"
-	
+
 ---------------------------------------
 ---------------------------------------
 
 
 *strtoupper(<string>)
 *strtoupper(<string>)
@@ -6872,7 +6873,7 @@ Example:
 
 
 Returns the specified string in it's uppercase/lowercase form.
 Returns the specified string in it's uppercase/lowercase form.
 All non-alpha characters will be preserved.
 All non-alpha characters will be preserved.
-	
+
 Example:
 Example:
 	
 	
 	strtoupper("The duck is blue!!"); //returns "THE DUCK IS BLUE!!"
 	strtoupper("The duck is blue!!"); //returns "THE DUCK IS BLUE!!"
@@ -6883,16 +6884,16 @@ Example:
 *charislower(<string>,<index>)
 *charislower(<string>,<index>)
 
 
 Returns 1 if character at specified index of specified string is
 Returns 1 if character at specified index of specified string is
-uppercase/lowercase. Otherwise, 0. Characters not of the alphabelt will return 0.
+uppercase/lowercase. Otherwise, 0. Characters not of the alphabet will return 0.
 
 
 Example:
 Example:
 	
 	
 	charisupper("rAthena", 1); //returns 1
 	charisupper("rAthena", 1); //returns 1
-	
+
 ---------------------------------------
 ---------------------------------------
 
 
 *substr(<string>,<start_index>,<end_index>)
 *substr(<string>,<start_index>,<end_index>)
-	
+
 Returns the sub-string of the specified string inclusively between the set
 Returns the sub-string of the specified string inclusively between the set
 indexes. If indexes are out of range, or the start index is after the end
 indexes. If indexes are out of range, or the start index is after the end
 index, an empty string will be returned.
 index, an empty string will be returned.
@@ -6900,7 +6901,7 @@ index, an empty string will be returned.
 Example:
 Example:
 	
 	
 	substr("foobar", 3, 5); //returns "bar"
 	substr("foobar", 3, 5); //returns "bar"
-	
+
 ---------------------------------------
 ---------------------------------------
 
 
 *explode(<dest_array>,<string>,<delimiter>)
 *explode(<dest_array>,<string>,<delimiter>)
@@ -6926,28 +6927,28 @@ Example:
 
 
 Combines all substrings within the specified string array into a single string.
 Combines all substrings within the specified string array into a single string.
 If the glue parameter is specified, it will be inserted inbetween each substring.
 If the glue parameter is specified, it will be inserted inbetween each substring.
-	
+
 Example:
 Example:
 	setarray .@my_array$[0], "This", "is", "a", "test";
 	setarray .@my_array$[0], "This", "is", "a", "test";
 	implode(.@my_array$, " "); //returns "This is a test"
 	implode(.@my_array$, " "); //returns "This is a test"
 
 
 ---------------------------------------
 ---------------------------------------
 
 
-*sprintf(<format>[,param[,param[,...]]]) [Mirei]
+*sprintf(<format>[,param[,param[,...]]])
 
 
 C style sprintf. The resulting string is returned same as in PHP. All C format 
 C style sprintf. The resulting string is returned same as in PHP. All C format 
 specifiers are supported except %n. More info: sprintf @ www.cplusplus.com. 
 specifiers are supported except %n. More info: sprintf @ www.cplusplus.com. 
 The number of params is only limited by rA's script engine.
 The number of params is only limited by rA's script engine.
 
 
 Example:
 Example:
-	.@format$ = 'The %s contains %d monkeys';
+	set .@format$, "The %s contains %d monkeys";
 	dispbottom(sprintf(.@format$, "zoo", 5));        //prints "The zoo contains 5 monkeys"
 	dispbottom(sprintf(.@format$, "zoo", 5));        //prints "The zoo contains 5 monkeys"
 	dispbottom(sprintf(.@format$, "barrel", 82));    //prints "The barrel contains 82 monkeys"
 	dispbottom(sprintf(.@format$, "barrel", 82));    //prints "The barrel contains 82 monkeys"
-	
+
 ---------------------------------------
 ---------------------------------------
 
 
-*sscanf(<string>,<format>[,param[,param[,...]]]) [Mirei]
-	
+*sscanf(<string>,<format>[,param[,param[,...]]])
+
 C style sscanf. All C format specifiers are supported. 
 C style sscanf. All C format specifiers are supported. 
 More info: sscanf @ www.cplusplus.com. The number of params is only limited 
 More info: sscanf @ www.cplusplus.com. The number of params is only limited 
 by rA's script engine.
 by rA's script engine.
@@ -6955,7 +6956,7 @@ by rA's script engine.
 Example:
 Example:
 	sscanf("This is a test: 42 foobar", "This is a test: %d %s", .@num, .@str$);
 	sscanf("This is a test: 42 foobar", "This is a test: %d %s", .@num, .@str$);
 	dispbottom(.@num + " " + .@str$); //prints "42 foobar"
 	dispbottom(.@num + " " + .@str$); //prints "42 foobar"
-	
+
 ---------------------------------------
 ---------------------------------------
 
 
 *strpos(<haystack>,<needle>{,<offset>})
 *strpos(<haystack>,<needle>{,<offset>})
@@ -6969,7 +6970,7 @@ Example:
 	strpos("foobar", "bar", 0); //returns 3
 	strpos("foobar", "bar", 0); //returns 3
 	strpos("foobarfoo", "foo", 0); //returns 0
 	strpos("foobarfoo", "foo", 0); //returns 0
 	strpos("foobarfoo", "foo", 1); //returns 6
 	strpos("foobarfoo", "foo", 1); //returns 6
-	
+
 ---------------------------------------
 ---------------------------------------
 
 
 *replacestr(<input>, <search>, <replace>{, <usecase>{, <count>}})
 *replacestr(<input>, <search>, <replace>{, <usecase>{, <count>}})
@@ -6983,7 +6984,7 @@ Example:
 	replacestr("testing tester", "test", "dash"); //returns "dashing dasher"
 	replacestr("testing tester", "test", "dash"); //returns "dashing dasher"
 	replacestr("Donkey", "don", "mon", 0);	//returns "monkey"
 	replacestr("Donkey", "don", "mon", 0);	//returns "monkey"
 	replacestr("test test test test test", "yay", 0, 3); //returns "yay yay yay test test"
 	replacestr("test test test test test", "yay", 0, 3); //returns "yay yay yay test test"
-	
+
 ---------------------------------------
 ---------------------------------------
 
 
 *countstr(<input>, <search>{, <usecase>})
 *countstr(<input>, <search>{, <usecase>})