lol O-o well now you know ^^ you can also do this:
- Code: Select all
strcpy(text, "yayness");
To display a variable in text:
- Code: Select all
sprintf(text, "integers: %d, %i, decimals: %f, strings: %s", integer 1, integer 2, double/float 1, string_1 (Such as player name);
Now this code will not work because the messages I had in it
%d or %i displays an integer value
%f displays a float/double value (or a _real_ variable)
%s displays a string, such as player_score.text or something.
To display a score with text:
- Code: Select all
sprintf(text, "Score: %d", score);
Or more advanced, the players name and then a score
- Code: Select all
sprintf(pname, "name_here");
sprintf(score.text, "%s's score: %d", pname, score);
This will output:
- Code: Select all
name_here's score: *value_here*