summaryrefslogtreecommitdiff
path: root/src/scripting/lua.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-02-10 14:45:26 +0100
committerPhilipp Sehmisch <crush@themanaworld.org>2009-02-10 14:58:59 +0100
commit08b15ca37fd6cb658a873b36115f2c78be29e272 (patch)
tree8c26fb9015e0a04659e6213ac7097eb853026d90 /src/scripting/lua.cpp
parentef5d6d3c0c8c35aabc0ee208572d95b7d1838147 (diff)
downloadmanaserv-08b15ca37fd6cb658a873b36115f2c78be29e272.tar.gz
manaserv-08b15ca37fd6cb658a873b36115f2c78be29e272.tar.bz2
manaserv-08b15ca37fd6cb658a873b36115f2c78be29e272.tar.xz
manaserv-08b15ca37fd6cb658a873b36115f2c78be29e272.zip
Removed testing.cpp because all of its functionality can now be covered by LUA scripts
Diffstat (limited to 'src/scripting/lua.cpp')
-rw-r--r--src/scripting/lua.cpp8
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);