Skip to content

Commit

Permalink
update the documentation for is_function()
Browse files Browse the repository at this point in the history
  • Loading branch information
Helianthella committed May 27, 2020
1 parent 9c653b1 commit d6324c8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions doc/script_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2040,16 +2040,19 @@ Example:

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

*is_function("<function name>")
*is_function("<function name>"{, <npc id>})
*is_function("<function name>"{, "<npc name>"})

This command checks whether or not a function exists and returns its type.
Returns false if it cannot be found.
This command checks whether or not a function exists and returns its type. If a
NPC name or ID is provided, it will try to find the label or function within
this NPC instead of the attached NPC. Returns false if it cannot be found.

return values:

FUNCTION_IS_COMMAND - built-in script command (eg: mes, select, ...)
FUNCTION_IS_GLOBAL - user-defined global function (callable with callfunc)
FUNCTION_IS_LOCAL - user-defined local function
FUNCTION_IS_PUBLIC - user-defined local function marked as public
FUNCTION_IS_LABEL - user-defined label function (callable with callsub)

Example:
Expand Down

0 comments on commit d6324c8

Please sign in to comment.