#How to make a variable resolve only to integer numbers

1 messages · Page 1 of 1 (latest)

hardy bolt
#

This is my current code and it doesn't seem to work

cinder needle
#

split the variable at the "." And remove the last part I guess

hardy bolt
#

Is there a way to make him not recognize none

cinder needle
#

so u want the variable to be just the normal number without decimal?

hardy bolt
#

correct

#

I want this variable to only recognize numeric values, no none

cinder needle
#

Ok

#

Honestly i don't know 💀

hardy bolt
# cinder needle Ok

If there is no way to make the result automatically return 1 if it is not a number

cinder needle
#

%{place::%player%} ? 1%

#

If it's none it would say 1 instead

#

also recommend using player's uuid

#

So players don't lose their progress when they change their name

hardy bolt
hardy bolt
#

He prints 1, but it's actually 7

cinder needle
#

Yes

#

Its basically the default value of that variable

hardy bolt
#

but my value is 7

cinder needle
#

it should say 7 then

#

It would only say 1 if it's <none>

hardy bolt
#

on place:
add 1 to {place::%player%}

On papi placeholder request for prefix "tcspapi":
If identifier is "fzb":
if {place::%player%} is greater than 2:
Set result to "%{place::%player%}%"
stop
else:
Set result to "%{place::%player%} ? 1%"

#

will still read none