OnConsoleInput: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Welcome| desc=This function is called when something is typed into the [[ConnectNPC |console] and enter key is pressed.| params=<syntaxhighlight lang="lua">( text )</syntaxh...") |
(No difference)
|
Revision as of 17:24, 24 December 2022
{{Welcome| desc=This function is called when something is typed into the [[ConnectNPC |console] and enter key is pressed.|
params=
( text )
text: The string that was typed in the console.
|
retvals=This function does not return any specific values.|
example=
function OnConsoleInput( text )
{
try
{
local script = compilestring( text );
script();
}catch(e)
{
print(e);
}
}
}}