TheRudolfGaming
Member
Hello. I'm currently experiencing either a bug, undocumented behavior, or something completely out of my comprehension.
In simple terms, I have a variable that stores the health for the player (
The problem is, that
But once I try to use this code:
The issue isn't string length. As soon as I use
I also tried
If there is anything required, I'll respond as swift as I can.
- Rudolf.
In simple terms, I have a variable that stores the health for the player (
health_var1
) and I want to draw the value of it on an object that's going to be sort of the HUD/GUI, AND next to it to be the max health value.The problem is, that
health_var1
is an integer, and you cannot concatenate a string and an integer directly, so I have to use string(health_var1)
to be able to.But once I try to use this code:
draw_text(health1[0],health1[1],"Health: " + string(health_var1) + "/100");
, this happens.The issue isn't string length. As soon as I use
draw_text(health1[0],health1[1],"Health: 100/100");
, everything works as planned.I also tried
draw_text(health1[0],health1[1],"Health: " + "100" + "/100");
, to test, but it produced the desired result as well. So the issue isn't in the concatenation or string length, but in string()
itself.If there is anything required, I'll respond as swift as I can.
- Rudolf.