summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/en/lua.rst13
1 files changed, 7 insertions, 6 deletions
diff --git a/DOCS/man/en/lua.rst b/DOCS/man/en/lua.rst
index 194483f9bb..4578ced97d 100644
--- a/DOCS/man/en/lua.rst
+++ b/DOCS/man/en/lua.rst
@@ -97,13 +97,14 @@ The ``mp`` module is preloaded, although it can be loaded manually with
Example:
- ```
- function my_fn()
- print("start of playback!")
- end
+ ::
+
+ function my_fn()
+ print("start of playback!")
+ end
+
+ mp.register_event("playback-start", my_fn)
- mp.register_event("playback-start", my_fn)
- ```
``mp.add_timeout(seconds, fn)``
Call the given function fn when the given number of seconds has elapsed.