Placeholders don't work in comparison: more or less

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Austral

Member
Sep 26, 2023
3
0
1
24
When I try to use a condition more or less for a placeholder, it doesn't work correctly.

I use Ersatz and Skellett-2.0.9
on click:
set {_online} to placeholder "%%server_online%%"
send "Online: %{_online}%"
if {_online} > 0:
send "%{_online}% > 0"
else:
send "%{_online}% < 0"
image.png
 
Use this instead in your code @Austral , (I also recommend using Ersatz)


set {_online} to placeholder "server_online"
set {_online} to "%{_online}%" parsed as integer
 
Use this instead in your code @Austral , (I also recommend using Ersatz)


set {_online} to placeholder "server_online"
set {_online} to "%{_online}%" parsed as integer
No, he should use skript-placeholders, I know they do literally the same thing, but Ersatz no longer receives updates, so in the future it could generate incompatibilities.
Also the code you give is not necessary, you are literally doing this:
set {_blah} to "text"
set {_blah} to "%{_blah}%" parsed as number


which doesn't make sense because {_blah} is already a text, you can achieve the same thing in a single line like this:
set {_online} to ((placeholder "server_online") parsed as integer)