MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / get_method_argument_count

Method get_method_argument_count

compat/fake_script.cpp:333–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331}
332
333int FakeScriptInstance::get_method_argument_count(const StringName &p_method, bool *r_is_valid) const {
334 Ref<Script> s = script;
335 while (s.is_valid()) {
336 bool valid = false;
337 int ret = s->get_script_method_argument_count(p_method, &valid);
338 if (valid) {
339 if (r_is_valid) {
340 *r_is_valid = true;
341 }
342 return ret;
343 }
344
345 s = s->get_base_script();
346 }
347
348 if (r_is_valid) {
349 *r_is_valid = false;
350 }
351 return 0;
352}
353
354Variant FakeScriptInstance::callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
355 if (has_method(p_method)) {

Callers

nothing calls this directly

Calls 3

is_validMethod · 0.45
get_base_scriptMethod · 0.45

Tested by

no test coverage detected