LuaUtil.wiki
changeset 2077 514babfbad9e
parent 1845 a6be83d2fe45
child 2108 237737e5336c
equal deleted inserted replaced
2076:0b6e80767d96 2077:514babfbad9e
    36 
    36 
    37 == Debugging functions ==
    37 == Debugging functions ==
    38 === <tt>WriteLnToConsole(string)</tt> ===
    38 === <tt>WriteLnToConsole(string)</tt> ===
    39 Writes `string` to `Logs/game0.log`, found in the user data directory.
    39 Writes `string` to `Logs/game0.log`, found in the user data directory.
    40 
    40 
    41 === <tt>WriteLnToChat(string)</tt> (0.9.24) ===
    41 === <tt>WriteLnToChat(string)</tt> ===
    42 Writes `string` into the chat.
    42 Writes `string` into the chat.
    43 
    43 
    44 === <tt>DumpPoint(x, y)</tt> (0.9.23) ===
    44 === <tt>DumpPoint(x, y)</tt> ===
    45 Converts the whole numbers `x` and `y` to strings and writes them to `Logs/game0.log`, one line each.
    45 Converts the whole numbers `x` and `y` to strings and writes them to `Logs/game0.log`, one line each.
    46 
    46 
    47 === <tt>StartGhostPoints(count)</tt> ===
    47 === <tt>StartGhostPoints(count)</tt> ===
    48 Just prints out “GHOST_POINTS” and the argument on the console. This function might change in later versions.
    48 Just prints out “GHOST_POINTS” and the argument on the console. This function might change in later versions.
    49 
    49 
    64 
    64 
    65 *Important*: If you use `ParseCommand` to overcome a shortcoming in our Lua API (e.g. a missing function), please make sure to [https://issues.hedgewars.org/enter_bug.cgi report the issue].
    65 *Important*: If you use `ParseCommand` to overcome a shortcoming in our Lua API (e.g. a missing function), please make sure to [https://issues.hedgewars.org/enter_bug.cgi report the issue].
    66 
    66 
    67 With your report we can fix the shortcoming in future releases. We will try to remove the reliance on `ParseCommand` as good as possible. This will allow scripts to use the previously missing feature in a way that won’t break!
    67 With your report we can fix the shortcoming in future releases. We will try to remove the reliance on `ParseCommand` as good as possible. This will allow scripts to use the previously missing feature in a way that won’t break!
    68 
    68 
    69 There are many available commands, but actual use in scripting is rare, and even then it's discouraged for long-term use. As of 0.9.24, the only command used in official scripts is:
    69 There are many available commands, but actual use in scripting is rare, and even then it's discouraged for long-term use. The only command used in official scripts is:
    70 
    70 
    71  * `"draw <map>"`: Draws a hand-drawn map. `MapGen` must be `mgDrawn` for this to work. `<map>` is a string which must follow the format specified in [DrawnMapFormat]
    71  * `"draw <map>"`: Draws a hand-drawn map. `MapGen` must be `mgDrawn` for this to work. `<map>` is a string which must follow the format specified in [DrawnMapFormat]
    72 
    72 
    73 Moreover, the control action names as listed in [ConfigurationFiles] (under “Binds”) can be used. Note we will eventually try to remove all `ParseCommand`s in the official scripts.
    73 Moreover, the control action names as listed in [ConfigurationFiles] (under “Binds”) can be used. Note we will eventually try to remove all `ParseCommand`s in the official scripts.
    74 
    74