- Code: Select all
function("variable: %d", var);
or:
- Code: Select all
function("variables: %d-%d", xscreen, yscreen);
So how would I get this to work?
function("variable: %d", var);
function("variables: %d-%d", xscreen, yscreen);
void
function (const char* format, int xs, int ys)
{
sprintf(text, format, xs, ys);
}
sprintf(text, "variables: %d-%d", xscreen, yscreen);
createWindow("text_actor_to_display", "message", x,y,width,height, index);
char myTemporaryString[256];
sprintf(myTemporaryString, "Variable: %i\nMy string: %s", someIntVar, someString);
//And then just input the 'myTemporaryString' into your function,
//to the place where you want the text to be, like:
myFunction(myTemporaryString, ...other arguments of the function...);
Users browsing this forum: No registered users and 1 guest