From 2b04ab874d75711bc021a0cd8dc7fca68f4e6929 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Tue, 11 Aug 2015 22:27:54 -0400 Subject: SAPI: Track last executed mod and include in error messages --- src/script/cpp_api/s_inventory.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/script/cpp_api/s_inventory.cpp') diff --git a/src/script/cpp_api/s_inventory.cpp b/src/script/cpp_api/s_inventory.cpp index c8c90fd8f..019d1ccc0 100644 --- a/src/script/cpp_api/s_inventory.cpp +++ b/src/script/cpp_api/s_inventory.cpp @@ -209,6 +209,9 @@ bool ScriptApiDetached::getDetachedInventoryCallback( lua_pop(L, 1); return false; } + + setOriginFromTable(-1); + lua_getfield(L, -1, callbackname); lua_remove(L, -2); // Should be a function or nil -- cgit v1.2.3