mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-05 18:41:05 +00:00
Change nil-component error to deprecation warning
This commit is contained in:
parent
6ca9d75f0b
commit
5c2599315c
3 changed files with 12 additions and 9 deletions
|
@ -272,11 +272,11 @@ int ModApiEnv::l_get_node_raw(lua_State *L)
|
|||
// mirrors the implementation of read_v3s16 (with the exact same rounding)
|
||||
{
|
||||
if (lua_isnoneornil(L, 1))
|
||||
throw LuaError("X position is nil");
|
||||
log_deprecated(L, "X position is nil", 1, true);
|
||||
if (lua_isnoneornil(L, 2))
|
||||
throw LuaError("Y position is nil");
|
||||
log_deprecated(L, "Y position is nil", 1, true);
|
||||
if (lua_isnoneornil(L, 3))
|
||||
throw LuaError("Z position is nil");
|
||||
log_deprecated(L, "Z position is nil", 1, true);
|
||||
double x = lua_tonumber(L, 1);
|
||||
double y = lua_tonumber(L, 2);
|
||||
double z = lua_tonumber(L, 3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue