Ryan6578 / Codewords

A LUA script for Codewords on Tabletop Simulator for Steam.
https://ryan6578.com
GNU General Public License v3.0
28 stars 16 forks source link

New parsing function causing errors when a player enters in an -inf clue #68

Closed Azzhoe closed 5 years ago

Azzhoe commented 5 years ago

Getting an Error in Script (Global) function pattern too complex error whenever a spymaster enters in an -inf clue. Happens most of the time, however it was working one time for the blue spymaster. But only once. This is the line that may be possibly causing the issue.

local clue, number = value:match("^(%a+[%-%a]*%a+)%s*%-?%s*(%d+)$")

Update: I did some more testing, and I notice when you enter an infinite clue in these formats, it works: clue inf clue - inf

but clue-inf returns that error.

Ryan6578 commented 5 years ago

This is an issue with Moonsharp (a LUA interpreter that TTS uses). TTS currently uses version 1.5.0.0 and 2.0.0.0 is out now. I'm not sure if this issue has been fixed in the latest release, but in the case that it isn't, or in the case that Berserk doesn't fix this, I have a way of mitigating this issue.