From Game Editor
For string variables write this:
strcpy(text, (char *)YourStringVar);
or
sprintf(text, "%s", YourStringVar);
%s is for string.
For integer and real variables the same as above, %d for an integer variable and %f for real variables.
example:
sprintf(text, "A string: %s\nAn integer: %d\nA float value: %f", "Hello!", 7, 3.4);
That changes your text to:
A string: Hello!
An integer: 7
A float value: 3.4
("\n" means new line)

![[]](/wiki/skins/blender/open.png)