equal
deleted
inserted
replaced
1510 |
1510 |
1511 <code language="lua">SetSoundMask(sndIncoming, true) |
1511 <code language="lua">SetSoundMask(sndIncoming, true) |
1512 -- Disable the “Incoming” sound from being played</code> |
1512 -- Disable the “Incoming” sound from being played</code> |
1513 |
1513 |
1514 == File system functions == |
1514 == File system functions == |
1515 === <tt>!HedgewarsScriptLoad(scriptPath)</tt> === |
1515 === <tt>!HedgewarsScriptLoad(scriptPath [,mustExist])</tt> === |
1516 Loads a script (i.e. a [LuaLibraries library]) from the specified `scriptPath`. The root directory is here Hedgewars’ data directory. |
1516 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. |
|
1517 |
|
1518 If `mustExist` is `false`, no Lua error will happen even when the script does not exist. |
|
1519 |
|
1520 Returns `true` if the script was loaded successfully, `false` otherwise. |
1517 |
1521 |
1518 Example: |
1522 Example: |
1519 <code language="lua"> |
1523 <code language="lua"> |
1520 HedgewarsScriptLoad("/Scripts/Locale.lua") -- loads locale library |
1524 HedgewarsScriptLoad("/Scripts/Locale.lua") -- loads locale library |
1521 </code> |
1525 </code> |