Engine:CCMD run

From AddOn Studio
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' to console, runs a Lua statement that adds '1 + 3' and prints the result, creates an alias 'bob', creates 'fred' variable that the alias 'bob' will show the value of, runs the 'bob' alias that effectively prints the value of 'fred' that is 'james'.

Notes