ForgeEssentials

ForgeEssentials

339k Downloads

Scripting interpreter is trying to parse standard Minecraft selector

timvandenhof opened this issue ยท 2 comments

commented

Currently I am trying out the scripting functionality offered by Forge Essentials.
One of the thing I try to accomplish is to play a sound from the scripting file to all players, for example a small sound when a user joins the server. To accomplish that I added a join.txt to the login scripting folder:

ForgeEssentials/Scripting/login/join.txt
echo Playing sound
$/playsound random.orb @a ~ ~ ~

The problem I'm currently facing is that the @e is being interpreted as a Forge Essentials scripting argument, which is not (its the all players selector offered by MC itself).

[Server thread/ERROR] [ForgeEssentials]: Error in script "join.txt": Unknown argument modifier "a"

Tried escaping it with another at-sign, but same error occures. Is there a way around or a way to make an alias for the specified playsound command so that I can use the alias instead so that the scripting engine is not trying to parse the @e selector?

commented

See https://github.com/ForgeEssentials/ForgeEssentials/wiki/JS-Scripting

You are using the old scripting method. That method is no longer supported.

commented

Thank you very much spacebuilder2020. It appears that I'm running a little older version of Forge Essentials and that seems to be the issue here. I didn't expect that big of a change in a 1.4.4 to 1.4.5 version change.

For future readers, I was using Forge Essentials 1.7.10 - 1.4.4.1187. Since Forge Essentials 1.4.5 there is a new javascript based scripting engine available. Script should be automatically migrated to the new scripting model. Will try upgrading FE in the upcomming weeks, if anything goes wrong I will report back.

I any one is interested in how the script migrations work, see the ScriptUpgrader.java source file:
https://github.com/ForgeEssentials/ForgeEssentials/blob/9914a59b1730a714d343f6cda9684675485e0f91/src/main/java/com/forgeessentials/jscripting/ScriptUpgrader.java