# "text" function creates decimal numbers

**URL:** <https://discourse.processing.org/t/text-function-creates-decimal-numbers/43653>\
**Category:** Coding Questions\
**Created:** [January 8, 2024, 5:11pm UTC](https://discourse.processing.org/t/text-function-creates-decimal-numbers/43653 "2024-01-08T17:11:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WillyGrz](https://avatars.discourse-cdn.com/v4/letter/w/c77e96/32.png) [@WillyGrz](https://discourse.processing.org/u/WillyGrz)\
**Post date:** [January 8, 2024, 5:11pm UTC](https://discourse.processing.org/t/text-function-creates-decimal-numbers/43653/1 "2024-01-08T17:11:16Z")

</div>

I have a variable called “player1Score” in a simple Pong game I am making. “player1Score” is equal to 0 at the beginning, and is set to add 1 when scoring. The text command states “text(player1Score, ~, ~)” when using this, it draws the 0 in the right place, yet it draws it as 0.000, or 1.000 etc… I have not found a way to change this.

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [January 8, 2024, 5:40pm UTC](https://discourse.processing.org/t/text-function-creates-decimal-numbers/43653/2 "2024-01-08T17:40:02Z")

</div>

> [@WillyGrz](#):
>
> player1Score

might be of type float and not type int?
