Torque 3D 3.8
Con::addCommand Function
void addCommand(const char* name, StringCallback cb, const char* usage, S32 minArgs, S32 maxArgs, bool toolOnly = false, ConsoleFunctionHeader* header = NULL);

Register a C++ function with the console making it a global function callable from the scripting engine. 

@param name Name of the new function. @param cb Pointer to the function implementing the scripting call; a console callback function returning a specific type value. @param usage Documentation for this function. @ref console_autodoc @param minArgs Minimum number of arguments this function accepts @param maxArgs Maximum number of arguments this function accepts @param toolOnly Wether this is a TORQUE_TOOLS only function. @param header The extended function header.

Copyright (c) 2015. All rights reserved.
What do you think about this topic? Send feedback!