I need help with this one

Hello,

I hope you all are doing fine. I wanted to ask a quick question. So, i started to code the game i.e bullcowcartridge.cpp and unfortunately, when i am using “TEXT” macro, to define the string, it gives me an error. Please check my screenshot and assit.

Thanks,
Prateek

Hi
Could you share the error itself?

Edit:
If you are talking about that part

#define TEXT(x) TEXT_PASTE(x)

Expands to:

TEXT_PARSE("cake")

then it’s not an error. This is just a hint to what TEXT macro expands.

Sure, but my code doesn’t run when i use syntax:-

PrintLine(TEXT(“String”));

It gives me an error.

For example, if i do:-

FString HiddenWord = TEXT(“Cake”) ;

And compile and run it on unreal, it doesn’t display the word cake and everything is erased.

Could you share the error?


So, as per the video, the cake word, should never disappear, when i type something, in the compiler. When it disappeared

Are you on mac? This appears to be an issue on macOS with the C/C++ extension. I suggest you report it on their GitHub issue tracker if it isn’t already reported.

It’s not disappearing. I’m pretty sure you’re just watching what you will be learning in the lecture. Your code as written isn’t supposed to print anything.

Yup, got it rectified. Actually when the function itself was standalone, it did not perform. But when i used

PrintLine(Input);

It did :slight_smile: and for now i think it has been rectified. Thanks for following up Dan for my concern.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms