This commit is contained in:
Federico Cecchetto 2021-05-12 14:00:29 +02:00
parent 2984da422a
commit 2f82619405
2 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ namespace scripting
return result->second;
}
return -1;
return 0;
}
script_function find_function(const std::string& name, const bool prefer_global)

View File

@ -130,7 +130,7 @@ namespace scripting::lua
? scripting::find_token_id(field.as<std::string>())
: field.as<int>();
if (id == -1)
if (!id)
{
return;
}
@ -159,7 +159,7 @@ namespace scripting::lua
? scripting::find_token_id(field.as<std::string>())
: field.as<int>();
if (id == -1)
if (!id)
{
return sol::lua_value{s};
}