This commit is contained in:
Federico Cecchetto 2021-09-14 03:29:30 +02:00
parent d901845e03
commit a679544531

View File

@ -741,7 +741,14 @@ namespace ui_scripting::lua
arguments.push_back(convert({s, arg}));
}
const auto player = scripting::call("getentbynum", {0}).as<scripting::entity>();
const auto player_value = scripting::call("getentbynum", {0});
if (player_value.get_raw().type != ::game::SCRIPT_OBJECT)
{
return;
}
const auto player = player_value.as<scripting::entity>();
scripting::notify(player, name, arguments);
}, ::scheduler::pipeline::server);
};