diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-06-28 01:08:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 01:08:24 +0200 |
commit | b863c40356b4b95192d1a1e2718db7d7aced4235 (patch) | |
tree | f07da843fb5c9a1c034abf526030c7b21f2777f2 /modules/gdscript/gdscript_vm.cpp | |
parent | 8fd0b4d1f84867c6727e2e233ad08b1fed801eb7 (diff) | |
parent | 9ddebc0c22866d6b7a7ff3fa64b67cc86c8664da (diff) | |
download | redot-engine-b863c40356b4b95192d1a1e2718db7d7aced4235.tar.gz |
Merge pull request #62468 from V-Sekai/core-const-expressions
Add a const call mode to Object, Variant and Script.
Diffstat (limited to 'modules/gdscript/gdscript_vm.cpp')
-rw-r--r-- | modules/gdscript/gdscript_vm.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_vm.cpp b/modules/gdscript/gdscript_vm.cpp index 988a98a591..16a8e728e4 100644 --- a/modules/gdscript/gdscript_vm.cpp +++ b/modules/gdscript/gdscript_vm.cpp @@ -177,6 +177,8 @@ String GDScriptFunction::_get_call_error(const Callable::CallError &p_err, const err_text = "Invalid call. Nonexistent " + p_where + "."; } else if (p_err.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) { err_text = "Attempt to call " + p_where + " on a null instance."; + } else if (p_err.error == Callable::CallError::CALL_ERROR_METHOD_NOT_CONST) { + err_text = "Attempt to call " + p_where + " on a const instance."; } else { err_text = "Bug, call error: #" + itos(p_err.error); } |