Skip to main content

LoadScript

This function was added in DSL 1

Description

Load a DSL script into the current script's environment.

info

This differs from StartScript as loading a script means it will load into the current script rather than fully 'starting' a new script.

This can basically be thought of as the DSL version of ImportScript (though you can still use ImportScript to load scripts from Scripts.img).

name is given as a relative path.

function LoadScript(name) --[[ ... ]] end

Parameters

  • name: string - The name of the script to load.

Return Values

None.

Example

LoadScript("scripts/my_script.lua")

See Also