From fbf867729e88e65f38395db6b689259a54395f04 Mon Sep 17 00:00:00 2001 From: JackMacWindows Date: Wed, 11 Sep 2024 17:16:33 -0400 Subject: [PATCH] Fixed #370 --- src/peripheral/chest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peripheral/chest.cpp b/src/peripheral/chest.cpp index 5460e518..c5932640 100644 --- a/src/peripheral/chest.cpp +++ b/src/peripheral/chest.cpp @@ -56,7 +56,7 @@ int chest::setItem(lua_State *L) { if (!lua_isstring(L, -1)) luaL_error(L, "bad field 'name' (expected string, got %s)", lua_typename(L, lua_type(L, -1))); lua_pop(L, 1); lua_getfield(L, 2, "count"); - if (!lua_isnumber(L, -1)) luaL_error(L, "bad field 'name' (expected string, got %s)", lua_typename(L, lua_type(L, -1))); + if (!lua_isnumber(L, -1)) luaL_error(L, "bad field 'count' (expected number, got %s)", lua_typename(L, lua_type(L, -1))); int count = lua_tointeger(L, -1); lua_settop(L, 2); lua_pushinteger(L, addItems(L, slot, count));