I'm trying to get an array<string> instance from a RegExp class I implemented on the C++ side and registered with the AS engine.
The AS side:
RegExp re;
int n = re.findall(response, matches);
Error message:
RegExp::findall(): Found -404223764 matches.
---
The script ended with an exception.
func: string getClientId()
modl:
sect: script
line: 32
desc: Index out of bounds
Method registration:
engine->RegisterObjectMethod("RegExp",
"int findall(string &in, array<string> &inout)",
asMETHODPR(RegExp, findall,
(const std::string &, CScriptArray* &), int),
asCALL_THISCALL);
Method:
int RegExp::findall(const std::string &subject, CScriptArray* &matches) {
if (!regexp) { return 0; }
Poco::RegularExpression::MatchVec matchesVector …