Quantcast
Channel: Questions in topic: "parser"
Viewing all articles
Browse latest Browse all 108

Bunny83 Expression Parser errors on some computers

$
0
0
I'm using a math expression parser made by @Bunny83 to create paths for enemies. I cannot find the version I'm using online (a friend got it from somewhere), so [here][1]'s a very similar one. An issue arose when parsing `sin(3*x)*0.5`. There is no problem with t$$anonymous$$s expression on my or a few others computers, however it breaks on *some other* PCs. I've even tried running the game on Wine and in a fresh VirtualBox Windows 10 but I can't reproduce it. The error is thrown from the script itself: `"Reached unexpected end wit$$anonymous$$n the parsing tree"`. T$$anonymous$$s happens when the Parse() function doesn't return a function. I also tried the version I linked above and it throws `NullReferenceException: Object reference not set to an instance of an object`, because that version doesn't do anyt$$anonymous$$ng with its error variable. The ones with the bug have the latest .NET Framework 4.8 as I do. I have other enemies that work with a simple `-x` path. I suspect there's a compatibility issue with some C# code that runs when the script parses the sine function, multiplication, parenthesis or/and even just numbers. Other t$$anonymous$$ng that I know is that enemies after t$$anonymous$$s error stop spawning, but it's probably because a static class calls the Parser. My Unity version is 2021.1.21f1, scripting backend is Mono and Api Compatibility Level is .NET Standard 2.0. I can try to change the last 2, but as I said I can't reproduce the bug myself so I would have to send builds to others. [1]: https://github.com/Bunny83/UnityWebExamples/blob/master/ExpressionParserWebGL/ExpressionParser.cs

Viewing all articles
Browse latest Browse all 108

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>