From 249bb091d4880a564c00f8354111e12cfd0183a3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 16 Feb 2020 23:03:14 +0100 Subject: manpage: improve command_native_async description --- DOCS/man/lua.rst | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index a9c0e9423e..a9fc02ed44 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -165,12 +165,19 @@ The ``mp`` module is preloaded, although it can be loaded manually with ``mp.command_native_async(table [,fn])`` Like ``mp.command_native()``, but the command is ran asynchronously (as far - as possible), and upon completion, fn is called. fn has two arguments: - ``fn(success, result, error)``. ``success`` is always a Boolean and is true - if the command was successful, otherwise false. The second parameter is - the result value (can be nil) in case of success, nil otherwise (as returned - by ``mp.command_native()``). The third parameter is the error string in case - of an error, nil otherwise. + as possible), and upon completion, fn is called. fn has three arguments: + ``fn(success, result, error)``: + + ``success`` + Always a Boolean and is true if the command was successful, + otherwise false. + + ``result`` + The result value (can be nil) in case of success, nil otherwise (as + returned by ``mp.command_native()``). + + ``error`` + The error string in case of an error, nil otherwise. Returns a table with undefined contents, which can be used as argument for ``mp.abort_async_command``. -- cgit v1.2.3