Skip to content

Commit

Permalink
Update script_commands.txt
Browse files Browse the repository at this point in the history
Fixed documentation errors:
-> Strings are always delimited by double quotes ("), not single qotes(');
-> Errors on optional parameters of monster and areamonster script commands;
-> Also fixed curlies for optional parameters in sprintf and sscanf.
  • Loading branch information
jaBote committed Jun 1, 2014
1 parent e9b9764 commit 17382d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/script_commands.txt
Expand Up @@ -5675,8 +5675,8 @@ Examples:
//=====================================
---------------------------------------

*monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>};
*areamonster "<map name>",<x1>,<y1>,<x2>,<y2>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>};
*monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>"{,<size>{,<ai>}}};
*areamonster "<map name>",<x1>,<y1>,<x2>,<y2>,"<name to show>",<mob id>,<amount>{,"<event label>"{,<size>{,<ai>}}};

This command will spawn a monster on the specified coordinates on the
specified map. If the script is invoked by a character, a special map
Expand Down Expand Up @@ -7648,15 +7648,15 @@ Example:

---------------------------------------

*sprintf(<format>[,param[,param[,...]]])
*sprintf(<format>{,param{,param{,...}}})

C style sprintf. The resulting string is returned same as in PHP. All C
format specifiers are supported except %n. For more info check sprintf
function at www.cplusplus.com
Number of params is only limited by Hercules' script engine.

Example:
.@format$ = 'The %s contains %d monkeys';
.@format$ = "The %s contains %d monkeys";
dispbottom(sprintf(.@format$, "zoo", 5));
//prints "The zoo contains 5 monkeys"

Expand All @@ -7665,7 +7665,7 @@ Example:

---------------------------------------

*sscanf(<string>,<format>[,param[,param[,...]]])
*sscanf(<string>,<format>{,param{,param{,...}}})

C style sscanf. All C format specifiers are supported.
More info: sscanf @ www.cplusplus.com. The number of params is only
Expand Down

0 comments on commit 17382d3

Please sign in to comment.