diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-03-24 18:10:21 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-03-24 18:10:21 +0100 |
commit | fad848bf7caff763ace7a8b88f06307feca77bac (patch) | |
tree | de4283956e5b051579b4ddccada99ddee9e4e383 /doc/en | |
parent | a08603c24c2a2b33fe8cdcb6e591ebf4cb7bd986 (diff) | |
download | weechat-fad848bf7caff763ace7a8b88f06307feca77bac.zip |
doc: add note about constants in lua, fix lua example (scripting guide)
Diffstat (limited to 'doc/en')
-rw-r--r-- | doc/en/weechat_scripting.en.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/en/weechat_scripting.en.txt b/doc/en/weechat_scripting.en.txt index 32e3859a3..eed6c4965 100644 --- a/doc/en/weechat_scripting.en.txt +++ b/doc/en/weechat_scripting.en.txt @@ -70,6 +70,8 @@ Lua ^^^ * Functions are called with `weechat.xxx(arg1, arg2, ...)` +* Constants in API are in fact functions, the returned value must be used as + constant (not the function itself). Tcl ^^^ @@ -323,7 +325,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test"); ---------------------------------------- function timer_cb(data, remaining_calls) weechat.print("", "timer! data="..data) - return weechat.WEECHAT_RC_OK + return weechat.WEECHAT_RC_OK() end weechat.hook_timer(1000, 0, 1, "timer_cb", "test") |