diff options
author | Wuzzy <wuzzy2@mail.ru> | 2017-06-03 08:20:22 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-06-03 08:20:22 +0200 |
commit | e91ffa0c911557f9f833e7b29066b8d3026751c7 (patch) | |
tree | 1b972f509a4c58f4b97e7dc7547ffdef768c96ee | |
parent | 1b83b0acfde26e1689202bb99659934ed598d705 (diff) | |
download | minetest-e91ffa0c911557f9f833e7b29066b8d3026751c7.tar.gz minetest-e91ffa0c911557f9f833e7b29066b8d3026751c7.tar.bz2 minetest-e91ffa0c911557f9f833e7b29066b8d3026751c7.zip |
Mention data type for get/set_attribute in docs (#5884)
-rw-r--r-- | doc/lua_api.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index e4ffa7bbe..9bf0b551b 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -3217,8 +3217,11 @@ This is basically a reference to a C++ `ServerActiveObject` * `11`: bubbles bar is not shown * `set_attribute(attribute, value)`: * Sets an extra attribute with value on player. - * If value is nil, remove attribute from player. -* `get_attribute(attribute)`: returns value for extra attribute. Returns nil if no attribute found. + * `value` must be a string. + * If `value` is `nil`, remove attribute from player. +* `get_attribute(attribute)`: + * Returns value (a string) for extra attribute. + * Returns `nil` if no attribute found. * `set_inventory_formspec(formspec)` * Redefine player's inventory form * Should usually be called in `on_joinplayer` |