diff -r b91b4d97132d -r e3ba8cad19d5 LuaAPI.wiki --- a/LuaAPI.wiki Mon Dec 03 23:55:14 2018 +0000 +++ b/LuaAPI.wiki Mon Dec 03 23:59:08 2018 +0000 @@ -1512,8 +1512,12 @@ -- Disable the “Incoming” sound from being played == 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. +=== !HedgewarsScriptLoad(scriptPath [,mustExist]) === +Loads a script (i.e. a [LuaLibraries library]) from the specified `scriptPath`. The root directory is here Hedgewars’ data directory. There will be a Lua error if the script does not exist. + +If `mustExist` is `false`, no Lua error will happen even when the script does not exist. + +Returns `true` if the script was loaded successfully, `false` otherwise. Example: