Hello
How can i write to the touchdesigner console or the error log window from a cplusplus CHOP? Its for debugging purpose (sorry if this is obvious, i am not an expert cpp coder )
If you use printf, it’ll go to the TD Console window. This is visible under the Dialogs->Console menu (it’s not the Textport). You can also output text data to an Info DAT for debugging as well.
thank you for your help. To be complete: i had to add the environment variable TOUCH_TEXT_CONSOLE=1 to see something with printf.
How do you access string[1-9] param inputs in C++?
I can’t see the structure in Visual Studio 2012 Express (or don’t understand it) but I can pull out the numStringInputs and string0 as per this
printf("numStringInputs %d string0 %s\r\n",(arrays)->numStringInputs, ((arrays)->stringInputs)->value);
Can you try:
printf("numStringInputs %d string0 %s\r\n", arrays->numStringInputs, arrays->stringInputs[0].value);
Replace the 0 with the string index of your choice.