Entering numbers in text messages

  • 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 community!

    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!

Cappy

Member
Aug 25, 2023
2
1
1
So I was having this issue for like a week until I eventually figured it out myself because I found no help for it online, so I decided to put this here just in case if someone else has the same issue as me.

So if you try to send a number variable in a chat message like this:
Code:
send "Current lives remaining: {lives}"
# {lives} is a number type
Then it just ignores the number and sends everything else, without a single error or warning. Turns out all you have to do is convert it into an expression
like the following and it works as you would expect:
Code:
send "Current lives remaining: %{lives}%"

I hope this little bit of info helps others because it sure would have helped me.
 
  • Like
Reactions: cookies
This isn't directly explained in the docs, but examples of it are very common, including on the home page: https://docs.skriptlang.org/
It's also explained in this guide: https://docs.skunity.com/guides/guide/texts.6 and in this tutorial: https://sovdee.gitbook.io/skript-tutorials/readme/the-basics#note-on-using-text-in-skript
Yea Im not trying to say your wrong, because your not. But when I google seached my issue which usually helps with that, none of those pages came up, and I even searched this site for help as well and nothing came up. I guess if I knew that fell under expressions those could have been useful but expressions are the last place I would have looked when all Im trying to do is show one number on its own.