equal
deleted
inserted
replaced
8 <code language="lua">HedgewarsScriptLoad("Scripts/<Library Name>.lua")</code> |
8 <code language="lua">HedgewarsScriptLoad("Scripts/<Library Name>.lua")</code> |
9 Where `<Library Name>` is replaced by the name. |
9 Where `<Library Name>` is replaced by the name. |
10 |
10 |
11 *Note*: In old scripts, you will find this line instead: |
11 *Note*: In old scripts, you will find this line instead: |
12 <code language="lua">loadfile(GetDataPath() .. "Scripts/<Library Name>.lua")()</code> |
12 <code language="lua">loadfile(GetDataPath() .. "Scripts/<Library Name>.lua")()</code> |
13 This does not work with new Hedgewars versions anymore and causes the script to break. You have to replace it with `HedgewarsScriptLoad`. |
13 This does not work with new Hedgewars versions anymore and causes the script to break. You have to replace it with `HedgewarsScriptLoad`. *Calls to `loadfile` are one of the most common reasons why old scripts do not work in recent Hedgewars versions.* |
14 |
14 |
15 = Locale = |
15 = Locale = |
16 |
16 |
17 This library allows you to translate string and should be used whenever a script has text. It loads the appropriate locale file and check automatically. |
17 This library allows you to translate string and should be used whenever a script has text. It loads the appropriate locale file and check automatically. |
18 |
18 |