Skript: ExprScripts: PatternSyntaxException

Created on 22 Jul 2020  路  3Comments  路  Source: SkriptLang/Skript

Description

An error is displayed in the console when I use the expression scripts.

Steps to Reproduce

Just run send "%scripts%".

Expected Behavior

There should be no error.

Errors / Screenshots

https://gist.github.com/Romitou/f7685d189b8735eec9e500b56d530fad

Server Information

  • Server version/platform: git-Spigot-800b93f-8160e29 (MC: 1.15.2)
  • Skript version: tested with 2.5-alpha5 and 2.5-alpha6 (I forgot to test with 2.5-alpha6(rev1), but the error is finally the same).
bug completed medium

Most helpful comment

This is caused by ExprScripts using String#replaceFirst with the intention of the first argument being a normal string, but it is actually parsed as regex: https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/expressions/ExprScripts.java#L87

All 3 comments

This is caused by ExprScripts using String#replaceFirst with the intention of the first argument being a normal string, but it is actually parsed as regex: https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/expressions/ExprScripts.java#L87

Should be fixed in #3194, and you are welcome to test out the nighty-build to find out (https://github.com/SkriptLang/Skript/suites/952837183/artifacts/11903429). However, the nightly build will contain the serious #3185 bug, just so that you are aware.

Thank you for the fix! 馃槃
It's working.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Misio12320 picture Misio12320  路  3Comments

DeagoTheDoggo picture DeagoTheDoggo  路  3Comments

TrademarkTM picture TrademarkTM  路  4Comments

Eryk1983S picture Eryk1983S  路  3Comments

MrScopes picture MrScopes  路  3Comments