LuaAPI.wiki
changeset 1699 4eea5f6707d9
parent 1697 699a39df73c5
child 1700 ef1f9ddfe5e2
equal deleted inserted replaced
1698:656ec7e0067e 1699:4eea5f6707d9
  1577 
  1577 
  1578 <code language="lua">SetSoundMask(sndIncoming, true)
  1578 <code language="lua">SetSoundMask(sndIncoming, true)
  1579 -- Disable the “Incoming” sound from being played</code>
  1579 -- Disable the “Incoming” sound from being played</code>
  1580 
  1580 
  1581 == File system functions ==
  1581 == File system functions ==
  1582 === <tt>!HedgewarsScriptLoad(scriptPath [,mustExist])</tt> ===
  1582 === <tt>!HedgewarsScriptLoad(scriptPath [, mustExist])</tt> ===
  1583 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.
  1583 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.
  1584 
  1584 
  1585 If `mustExist` is `false`, no Lua error will happen even when the script does not exist.
  1585 If `mustExist` is `false`, no Lua error will happen even when the script does not exist.
  1586 
  1586 
  1587 Returns `true` if the script was loaded successfully, `false` otherwise.
  1587 Returns `true` if the script was loaded successfully, `false` otherwise.