#comparison

1 messages · Page 1 of 1 (latest)

blazing bough
#

Is it possible to compare statistics with some kind of number?
conditionally compare the number of deaths by placeholder with 80

namely compare the placeholder value with the number

narrow fulcrum
# blazing bough Is it possible to compare statistics with some kind of number? conditionally com...

yeah you can, in my case i use skript-placeholders addon, you can use this to get the value of the placeholder and compare it https://skripthub.net/docs/?id=4372

blazing bough
#

yes I tried
if {_amet} is greater than or equal to 80:

but this is the test section, and as a result, for some reason, in any case, it turns out that I have less than 80

narrow fulcrum
#

can you send the code¿

blazing bough
#
    trigger:
        set {_amet} to placeholder "uecon_balance_amet_total_formatted" of player
        if {_amet} is greater than or equal to 80:
            send "true" to player
        else:
            send "false" to player

#

always "false"

blazing plinth
#

it's likely returning a string

#

not a number

#

you'll want to parse as a number

narrow fulcrum
#

maybe because it is showing the placeholder as a text and not as a real number. In that case you are comparing a text with a number

#

you should use set {_amet} to placeholder... of player parsed as a number

blazing plinth
#

the _formatted makes me suspicious of whether it's parsable tbh

blazing plinth
#

your placeholder probably has stuff like $ or commas in it

#

that makes it not parsable as a number

#

you will have to remove them or use a different placeholder

blazing bough
#

placeholder has no punctuation marks, only a number

blazing plinth
#

a coloured number

#

you must uncolour it

blazing bough
#

Okey,thk

blazing bough
blazing bough
blazing plinth
#

what?

blazing bough
#

⬆️

blazing plinth
#

what does that mean

blazing plinth
#

yes what does "doesn't work" mean

blazing bough
#

nothing changes, as before the replacement it was conditionally 10 000 and as a result, 10 000 remained

#

space is not removed

blazing plinth
#

how did you test

blazing bough
#

displayed variables in chat

blazing plinth
#

show

blazing bough
#

replace all " " with "" in {_amet} send "%{_amet}%"

blazing plinth
#

are you sure it's a space

#

it could be a different whitespace character

blazing bough
#

a.. and how to recognize what it is. what to replace

blazing plinth
#

idk you'd have to figure it out
maybe ask the plugin author
or use a different placeholder

#

or even use player's balance

blazing bough