# HG changeset patch # User almikes@aol.com # Date 1417575838 0 # Node ID 36537eaf680c0b581f0b62771393c112df21af23 # Parent 41bd558039c0760dea60d86c8e45d506f44a5204 Add HedgewarsScriptLoad diff -r 41bd558039c0 -r 36537eaf680c LuaAPI.wiki --- a/LuaAPI.wiki Wed Dec 03 02:52:36 2014 +0000 +++ b/LuaAPI.wiki Wed Dec 03 03:03:58 2014 +0000 @@ -853,6 +853,14 @@ == File system functions == +=== HedgewarsScriptLoad(scriptPath) === +Loads a script (i.e. a [LuaLibraries library]) from the specified `scriptPath`. The root directory is here Hedgewars’ data directory. + +Example: +{{{ +HedgewarsScriptLoad("/Scripts/Locale.lua") -- loads locale library +}}} + === !GetDataPath() ===
Returns the path to the data directory, used when adding libraries.