diff options
Diffstat (limited to 'src/scripting')
-rw-r--r-- | src/scripting/lua.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 010179b4..1cfb8766 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -982,6 +982,14 @@ static int get_map_id(lua_State *s) */ static int item_drop(lua_State *s) { + if (!lua_isnumber(s, 1) || + !lua_isnumber(s, 2) || + !lua_isnumber(s, 3)) + { + raiseScriptError(s, "trigger_create called with incorrect parameters."); + return 0; + } + int x = lua_tointeger(s, 1); int y = lua_tointeger(s, 2); int type = lua_tointeger(s, 3); |