summaryrefslogtreecommitdiff
path: root/src/scriptapi.cpp
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-01-03 17:59:28 +0000
committerPerttu Ahola <celeron55@gmail.com>2013-01-07 19:00:33 +0200
commit0b1d09ff4f4e92986f6abdbc57db97c18707196a (patch)
tree1ae8016123a1c031406653c924c6f32e1e24db43 /src/scriptapi.cpp
parent8b75736c6f747ec4d01419ee6475e03feab398b9 (diff)
downloadminetest-0b1d09ff4f4e92986f6abdbc57db97c18707196a.tar.gz
minetest-0b1d09ff4f4e92986f6abdbc57db97c18707196a.tar.bz2
minetest-0b1d09ff4f4e92986f6abdbc57db97c18707196a.zip
Fix buttons not working for Lua-triggered formspecs
Diffstat (limited to 'src/scriptapi.cpp')
-rw-r--r--src/scriptapi.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp
index 60e5b55f4..8e4a43266 100644
--- a/src/scriptapi.cpp
+++ b/src/scriptapi.cpp
@@ -4921,13 +4921,14 @@ static int l_create_detached_inventory_raw(lua_State *L)
return 1;
}
-// create_detached_formspec_raw(name)
+// show_formspec(playername,formname,formspec)
static int l_show_formspec(lua_State *L)
{
const char *playername = luaL_checkstring(L, 1);
- const char *formspec = luaL_checkstring(L, 2);
+ const char *formname = luaL_checkstring(L, 2);
+ const char *formspec = luaL_checkstring(L, 3);
- if(get_server(L)->showFormspec(playername,formspec))
+ if(get_server(L)->showFormspec(playername,formspec,formname))
{
lua_pushboolean(L, true);
}else{