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
(Using a slightly older version of skript (2.2dev37), which could be responsible. I thought I'd report it just to be safe. If it's caused by my skript version then please ignore this.)
Describe the bug
Certain methods can be used fine in effect commands, but fail to load when used in custom syntax for effects, expressions and conditions.
To reproduce
Run effect command {bar}.setProgress(0.5), where {bar} is a boss bar.
Then try using this (or any similar code using any of the boss bar modifying methods)
effect test for bar %object%:
trigger:
set {bar} to expr-1
{bar}.setProgress(0.5)
Other methods that have the same issue are getTotalExperience(), ``setTotalExperience()` and no doubt many others. These are the only ones I have tested it with.
Here is an example of the error produced when loading this: Can't understand this expression: 'expr-1.getTotalExperience()'
An example of the custom syntax could be expression %player%'s total experience points:
Here is an example of it working fine by effect command:
Here is an example of it not working fine in custom syntax:
Using this syntax for the get method:
player property total [e]xp[erience]:
get:
return expr-1.getTotalExperience()
Additionally, I also receive this error often in conjunction (though not always) -
if I use return expr-1.getTotalExperience() instead of setting a variable and returning the variable.
I presume the two are linked.
Expected behavior
I expected using the method within a custom syntax to work.
Screenshots
In theory, this should work fine. All of them work by using effect commands with a player or a variable as the selector.
Server information
skript-mirror: 2.0.0 (latest)
Skript: 2.2dev37c
Bukkit: git-Spigot-dcd1643-e60fc34 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)
Minecraft: 1.12.2
Java: Not sure? It's a fresh install, so presumably a very recent one.
OS: Ubuntu 18.04
Additional context
Nope.
The text was updated successfully, but these errors were encountered:
You had an invisible character right after getTotalExperience xD be careful when copying methods from javadocs. Normally i notice them in console but the console your are using supports them. And in Minecraft chat you can't use unicode characters like that.
The outside of function error happens when the code is not correct, so it thinks the code is not related to skript-mirror and lets Skript to handle its own return effect.
(Using a slightly older version of skript (2.2dev37), which could be responsible. I thought I'd report it just to be safe. If it's caused by my skript version then please ignore this.)
Describe the bug
Certain methods can be used fine in effect commands, but fail to load when used in custom syntax for effects, expressions and conditions.
To reproduce
Run effect command
{bar}.setProgress(0.5)
, where{bar}
is a boss bar.Then try using this (or any similar code using any of the boss bar modifying methods)
Other methods that have the same issue are
getTotalExperience()
, ``setTotalExperience()` and no doubt many others. These are the only ones I have tested it with.Here is an example of the error produced when loading this:
Can't understand this expression: 'expr-1.getTotalExperience()'
An example of the custom syntax could be
expression %player%'s total experience points:
Here is an example of it working fine by effect command:
Here is an example of it not working fine in custom syntax:
Using this syntax for the
get
method:Additionally, I also receive this error often in conjunction (though not always) -
return expr-1.getTotalExperience()
instead of setting a variable and returning the variable.I presume the two are linked.
Expected behavior
I expected using the method within a custom syntax to work.
Screenshots
In theory, this should work fine. All of them work by using effect commands with a player or a variable as the selector.
Server information
Additional context
Nope.
The text was updated successfully, but these errors were encountered: