Turns a real number into a string.


GML Code Example


Argument Description
str The real number to be turned into a string.

Returns: String


With this function you can turn any real number into a string. If the real number is an integer, it will be saved with no decimal places, otherwise, it will be saved with two decimal places.


GML Code Example

draw_text(100, 100, "Score: " + string(score) + " / Health: " + string(health));

The above code uses the string function to draw both real numbers and strings together (draw will only accept either a string or a real, but not both).

Back: Strings

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here