Engine:Console commands: Difference between revisions

Line 17: Line 17:
** <kua>context lua; print(1 + 3); exit</kua> Also prints '3' and returns to 'global'. Where the 'lua' context is switched to first, then the Lua command is run unqualified also using the default 'lua_edit' command.
** <kua>context lua; print(1 + 3); exit</kua> Also prints '3' and returns to 'global'. Where the 'lua' context is switched to first, then the Lua command is run unqualified also using the default 'lua_edit' command.
* Context - A script or command context. Each context may have its own commands and variables and rules. Examples:
* Context - A script or command context. Each context may have its own commands and variables and rules. Examples:
** <kua>client start</kua> Starts the client module.
** <kua>client start</kua> Starts the client module. The 'client' context is addressable from 'global', and the client 'start' command is run.  
** <kua>context client; start; context global</kua> Starts the client module and returns to global.
** <kua>context client; start; context global</kua> Also starts the client module. Switches to 'client', then runs the 'start' command, then switches back to global.
* Command - An engine module command, also referred to as a 'CCmd'.
* Command - An engine module command, also referred to as a 'CCmd'.
* Variable - An engine variable, similar to 'CVars' or config vars.
* Variable - An engine variable, similar to 'CVars' or config vars.