MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CallIntegerMethod

Method CallIntegerMethod

src/script/squirrel.cpp:422–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420}
421
422bool Squirrel::CallIntegerMethod(HSQOBJECT instance, std::string_view method_name, int *res, int suspend)
423{
424 HSQOBJECT ret;
425 if (!this->CallMethod(instance, method_name, &ret, suspend)) return false;
426 if (ret._type != OT_INTEGER) return false;
427 *res = ObjectToInteger(&ret);
428 return true;
429}
430
431bool Squirrel::CallBoolMethod(HSQOBJECT instance, std::string_view method_name, bool *res, int suspend)
432{

Callers 3

ConstructorMethod · 0.80
ConstructorMethod · 0.80
ConstructorMethod · 0.80

Calls 1

CallMethodMethod · 0.95

Tested by

no test coverage detected