diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-01-15 21:01:00 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-01-16 18:12:10 +0100 |
commit | 4f3c8451684f00691a26b62dff78be5920596f80 (patch) | |
tree | 3727122168541560ffc7c854d8f8bbc9e839702c /src | |
parent | 823350d7f5cc4ee677d9a78b2c4f90fb275d953c (diff) | |
download | manaserv-4f3c8451684f00691a26b62dff78be5920596f80.tar.gz manaserv-4f3c8451684f00691a26b62dff78be5920596f80.tar.bz2 manaserv-4f3c8451684f00691a26b62dff78be5920596f80.tar.xz manaserv-4f3c8451684f00691a26b62dff78be5920596f80.zip |
Added several script warnings on errors.
As requested by Ablu.
Reviewed-by: Ablu.
Diffstat (limited to 'src')
-rw-r--r-- | src/scripting/lua.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 2b92e193..26de371c 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -1112,7 +1112,7 @@ static int being_get_name(lua_State *s) lua_pushstring(s, being->getName().c_str()); return 1; } - + raiseScriptError(s, "being_get_name called for an invalid being."); return 0; } @@ -1129,7 +1129,7 @@ static int being_get_action(lua_State *s) lua_pushinteger(s, being->getAction()); return 1; } - + raiseScriptError(s, "being_get_action called for an invalid being."); return 0; } @@ -1147,7 +1147,10 @@ static int being_set_action(lua_State *s) { being->setAction((BeingAction) act); } - + else + { + raiseScriptError(s, "being_set_action called for an invalid being."); + } return 0; } @@ -1164,7 +1167,7 @@ static int being_get_direction(lua_State *s) lua_pushinteger(s, being->getDirection()); return 1; } - + raiseScriptError(s, "being_get_direction called for an invalid being."); return 0; } @@ -1182,7 +1185,7 @@ static int being_set_direction(lua_State *s) { being->setDirection(dir); } - + raiseScriptError(s, "being_set_direction called for an invalid being."); return 0; } @@ -1200,7 +1203,7 @@ static int posX(lua_State *s) lua_pushinteger(s, x); return 1; } - + raiseScriptError(s, "posX called for an invalid being."); return 0; } @@ -1218,7 +1221,7 @@ static int posY(lua_State *s) lua_pushinteger(s, y); return 1; } - + raiseScriptError(s, "posY called for an invalid being."); return 0; } |