summaryrefslogtreecommitdiff
path: root/src/luaconsole.c
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-06-05 20:38:00 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-06-08 11:48:44 (GMT)
commitb5856bfa47020448961a60689dc2a44d09baf2ec (patch)
treefb28d2ef8317dab27ae4d3336bafb6929d6f9b4a /src/luaconsole.c
parentb3e0085606c87052fddf2f0e25ba8a596a384a74 (diff)
downloadpowder-b5856bfa47020448961a60689dc2a44d09baf2ec.zip
powder-b5856bfa47020448961a60689dc2a44d09baf2ec.tar.gz
console_error now optional for console_parse_type
Prevents lua step functions from clearing console_error in calls to console_parse_type, hence preventing luacon_eval errors from being shown
Diffstat (limited to 'src/luaconsole.c')
-rw-r--r--src/luaconsole.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luaconsole.c b/src/luaconsole.c
index c362e34..052aa98 100644
--- a/src/luaconsole.c
+++ b/src/luaconsole.c
@@ -169,7 +169,7 @@ int luatpt_create(lua_State* l)
return luaL_error(l, "Unrecognised element number '%d'", t);
} else {
name = luaL_optstring(l, 3, "dust");
- if (!console_parse_type(name, &t, console_error))
+ if (!console_parse_type(name, &t, NULL))
return luaL_error(l,"Unrecognised element '%s'", name);
}
retid = create_part(-1, x, y, t);
@@ -393,7 +393,7 @@ int luatpt_set_property(lua_State* l)
if(acount>2){
if(!lua_isnumber(l, acount) && lua_isstring(l, acount)){
name = luaL_optstring(l, acount, "none");
- if (!console_parse_type(name, &partsel, console_error))
+ if (!console_parse_type(name, &partsel, NULL))
return luaL_error(l, "Unrecognised element '%s'", name);
}
}
@@ -409,7 +409,7 @@ int luatpt_set_property(lua_State* l)
return luaL_error(l, "Unrecognised element number '%d'", t);
} else {
name = luaL_optstring(l, 2, "dust");
- if (!console_parse_type(name, &t, console_error))
+ if (!console_parse_type(name, &t, NULL))
return luaL_error(l, "Unrecognised element '%s'", name);
}
if(i == -1 || (w != -1 && h != -1)){