error on missing builtin functions
This commit is contained in:
parent
92e5479b45
commit
e4fac2e445
@ -131,9 +131,18 @@ namespace gsc
|
|||||||
const auto function_id = get_function_id();
|
const auto function_id = get_function_id();
|
||||||
|
|
||||||
if (!functions.contains(function_id))
|
if (!functions.contains(function_id))
|
||||||
|
{
|
||||||
|
if (function == nullptr)
|
||||||
|
{
|
||||||
|
force_error_print = true;
|
||||||
|
gsc_error_msg = "function doesn't exist";
|
||||||
|
game::Scr_ErrorInternal();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
function();
|
function();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
execute_custom_function(function_id);
|
execute_custom_function(function_id);
|
||||||
@ -152,9 +161,18 @@ namespace gsc
|
|||||||
const auto function_id = get_function_id();
|
const auto function_id = get_function_id();
|
||||||
|
|
||||||
if (!methods.contains(function_id))
|
if (!methods.contains(function_id))
|
||||||
|
{
|
||||||
|
if (method == nullptr)
|
||||||
|
{
|
||||||
|
force_error_print = true;
|
||||||
|
gsc_error_msg = "method doesn't exist";
|
||||||
|
game::Scr_ErrorInternal();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
method(saved_ent_ref);
|
method(saved_ent_ref);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
execute_custom_method(function_id);
|
execute_custom_method(function_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user