You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can see that it throws the error:
"string.match is unsupported".
But this error message sucks and is misleading, because what it really means is that the String.match method is unsupported. The Lua string.match is absolutely supported.
What we really need to do here is to reconfigure the code to look like this:
conststring1="The quick brown fox jumps over the lazy dog.";constmatch=string.match(string1,"brown (%w+) jumps");
So, in conclusion, I think the error message should say:
The String.match method is unsupported. Consider including the Lua types for your environment and then changing the code to string.match(foo, regex) instead. Note that the Lua match works differently than the JavaScript/TypeScript match, so for example you would have to change \w+ to %w+.
The message should explicitly tell you to use
string.match(foo, regex)
.The text was updated successfully, but these errors were encountered: