mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 09:59:44 +00:00
fix
This commit is contained in:
parent
0104585e10
commit
77d9ca1d86
2 changed files with 5 additions and 2 deletions
|
|
@ -62,6 +62,9 @@ static int l_get_def(lua::State* L) {
|
|||
static int l_spawn(lua::State* L) {
|
||||
auto level = controller->getLevel();
|
||||
auto defname = lua::tostring(L, 1);
|
||||
if (defname == nullptr) {
|
||||
throw std::runtime_error("empty string");
|
||||
}
|
||||
auto& def = content->entities.require(defname);
|
||||
auto pos = lua::tovec3(L, 2);
|
||||
dv::value args = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue