Difference between revisions of "CommandArgumentType"
From Nomad DB
Line 1: | Line 1: | ||
− | Arguments to [[ | + | Arguments to [[ScriptHook: Console Commands|Console Commands]] can be parsed and validated before the callback is called. Providing a ''CommandArgumentType'' to [[ICommandRegistry:AddArgument]] is optional (no validation will be done). |
== Types == | == Types == | ||
Line 28: | Line 28: | ||
== Related Pages == | == Related Pages == | ||
* [[ICommandRegistry]] | * [[ICommandRegistry]] | ||
− | * [[ | + | * [[ScriptHook: Console Commands]] |
− | [[Category: | + | [[Category:ScriptHook Lua]] |
Latest revision as of 12:58, 6 October 2020
Arguments to Console Commands can be parsed and validated before the callback is called. Providing a CommandArgumentType to ICommandRegistry:AddArgument is optional (no validation will be done).
Types
Name | Lua Type | Description |
---|---|---|
CommandArgumentType.Any | string | No validation is performed |
CommandArgumentType.Int32
CommandArgumentType.UInt32 |
number | The argument is parsed as a 32-bit integer. If UInt32 is specified, no negative values can be supplied. |
CommandArgumentType.Int64
CommandArgumentType.UInt64 |
string | The argument is parsed as a 64-bit integer. If UInt64 is specified, no negative values can be supplied. Since Lua 5.1 cannot handle 64-bit Integers, this will be passed as string, |
CommandArgumentType.Float | number | The argument is parsed as decimal value. |