error on missing builtin functions

This commit is contained in:
quaK 2023-01-16 20:11:06 +02:00
parent 92e5479b45
commit e4fac2e445

View File

@ -132,7 +132,16 @@ namespace gsc
if (!functions.contains(function_id))
{
function();
if (function == nullptr)
{
force_error_print = true;
gsc_error_msg = "function doesn't exist";
game::Scr_ErrorInternal();
}
else
{
function();
}
}
else
{
@ -153,7 +162,16 @@ namespace gsc
if (!methods.contains(function_id))
{
method(saved_ent_ref);
if (method == nullptr)
{
force_error_print = true;
gsc_error_msg = "method doesn't exist";
game::Scr_ErrorInternal();
}
else
{
method(saved_ent_ref);
}
}
else
{