49
edits
(→Key) |
(→Key) |
||
| 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 | ** <kua>client start</kua> Starts the client service. The 'client' context is addressable from 'global', and the client 'start' command is run. | ||
** <kua>context client; start; context global</kua> Also starts the client | ** <kua>context client; start; context global</kua> Also starts the client service. Switches to 'client'. Then runs the 'start' command from "inside" the 'client' context, 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. | ||