equal
deleted
inserted
replaced
8 == Usage == |
8 == Usage == |
9 To use a library you only need to add this function call at the top of the script: |
9 To use a library you only need to add this function call at the top of the script: |
10 <code language="lua">HedgewarsScriptLoad("Scripts/<Library Name>.lua")</code> |
10 <code language="lua">HedgewarsScriptLoad("Scripts/<Library Name>.lua")</code> |
11 Where `<Library Name>` is replaced by the name. |
11 Where `<Library Name>` is replaced by the name. |
12 |
12 |
13 === Legacy `loadfile` == |
|
14 *Note*: In ancient scripts, you might find this call instead: |
13 *Note*: In ancient scripts, you might find this call instead: |
15 <code language="lua">loadfile(GetDataPath() .. "Scripts/<Library Name>.lua")()</code> |
14 <code language="lua">loadfile(GetDataPath() .. "Scripts/<Library Name>.lua")()</code> |
16 This does not work with new Hedgewars versions anymore and causes the script to break. Use `HedgewarsScriptLoad` instead. |
15 This does not work with new Hedgewars versions anymore and causes the script to break. Use `HedgewarsScriptLoad` instead. |
17 |
16 |
18 == List of Lua libraries == |
17 == List of Lua libraries == |