From 0b1d09ff4f4e92986f6abdbc57db97c18707196a Mon Sep 17 00:00:00 2001 From: sapier Date: Thu, 3 Jan 2013 17:59:28 +0000 Subject: Fix buttons not working for Lua-triggered formspecs --- src/scriptapi.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/scriptapi.cpp') 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{ -- cgit v1.2.3