Engine:CCMD run

From AddOn Studio
Revision as of 18:47, 15 October 2023 by Bear (talk | contribs) (Created page with "{{dev/uiccmd}} Load and run script file. Run a named script file. Name must include extension. <kua>run startup.cfg</kua> == Arguments == * name - The name of the script file to load and run. == Associations == * Is by default placed in the 'global' context. == Details == == Examples == === Default values === For a script file named 'startup.cfg' and looks like: <kua> echo fred lua print(1 + 3) alias bob fred var fred james bob </kua> * Try to load a non-existent fil...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Console commands

Load and run script file. Run a named script file. Name must include extension.

run startup.cfg

Arguments

  • name - The name of the script file to load and run.

Associations

  • Is by default placed in the 'global' context.

Details

Examples

Default values

For a script file named 'startup.cfg' and looks like:

echo fred
lua print(1 + 3)
alias bob fred
var fred james
bob
  • Try to load a non-existent file.
> run bob.cfg
Run failed: bob.cfg
  • Run the example script file.
> run startup.cfg
fred
4
'fred' is 'james'
In this case: echos 'fred', runs Lua runtime command, creates an alias, creates 'fred' variable that the alias 'bob' will show the value of, runs the 'bob' alias that effectivly prints the value of 'fred' that is 'james'.

Notes