lua:introduction_to_lua_programming
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
introduction_to_lua_programming [2020/10/29 10:35] – atolstov | lua:introduction_to_lua_programming [2021/08/05 13:32] – emozolyak | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{ :: | ||
====== Introduction to Lua programming ====== | ====== Introduction to Lua programming ====== | ||
WebHMI allows you to create custom programs (scripts) in [[https:// | WebHMI allows you to create custom programs (scripts) in [[https:// | ||
Line 11: | Line 12: | ||
Here is an example of a simple script for WebHMI: | Here is an example of a simple script for WebHMI: | ||
- | <code lua log> | + | <code lua> |
--[[ | --[[ | ||
these vars will be assigned only once | these vars will be assigned only once | ||
Line 102: | Line 103: | ||
Here we see that the error occurred while trying to perform an arithmetic operation with an undefined variable (value is **nil**). The error occurred in script with id=1, its name was ' | Here we see that the error occurred while trying to perform an arithmetic operation with an undefined variable (value is **nil**). The error occurred in script with id=1, its name was ' | ||
- | Thus, using this log you can find all runtime errors in your scripts. Also for debugging you can use watch console window, which is available in [[scripts editor]]. | + | Thus, using this log you can find all runtime errors in your scripts. Also for debugging you can use watch console window, which is available in [[lua: |
lua/introduction_to_lua_programming.txt · Last modified: 2022/01/17 20:58 by 127.0.0.1