detailed error message

This commit is contained in:
Astazium 2026-08-04 23:26:03 +03:00 • committed by GitHub
parent 7536ac2736
commit c6d8035f3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,7 +72,7 @@ static int l_spawn(lua::State* L) {
auto level = controller->getLevel();
auto defname = lua::tostring(L, 1);
if (defname == nullptr) {
throw std::runtime_error("invalid string");
throw std::runtime_error("string expected, got nil");
}
auto& def = content->entities.require(defname);
auto pos = lua::tovec3(L, 2);