List of Nasal extension functions: Difference between revisions

Jump to navigation Jump to search
m
m (→‎addcommand(): & logprint() (both are James' work))
Line 46: Line 46:


Add a fgcommand which can be used like a regular fgcommand (global scope, etc.). First argument is the name, second is the function to run. Note that this fgcommand will always return true! Inside the callback/function one can use either cmdarg() to retrieve the arguments or use the first argument passed to the function (since they will be the same).
Add a fgcommand which can be used like a regular fgcommand (global scope, etc.). First argument is the name, second is the function to run. Note that this fgcommand will always return true! Inside the callback/function one can use either cmdarg() to retrieve the arguments or use the first argument passed to the function (since they will be the same).
=== <tt>removecommand()</tt> ===
As you can guess, there's also a removecommand() function which will remove '''any''' command – even those implemented in C++! As such it can be very dangerous and remove core functionality, so use with caution.


=== <tt>logprint()</tt> ===
=== <tt>logprint()</tt> ===
395

edits

Navigation menu