My c++ code should work, but UCLASS and class is throwing errors that can't be fixed.
I get the error: "This declaration has no storage class or type specifier" in regards to the word UCLASS, and "class" returns "Expected a ;" I have retried this at least 10 times, to NO avail. What is wrong?
Your class should deriver from AActor or UObject. Also it should include some generated headers and so on. It's kind a boring task to explain every aspect here, so the best solution for you should be making new class from Unreal Editor:
As a result, you'll get already compiled, correctly written class.
Like this one:
Follow this question
Once you sign in you will be able to subscribe for any updates here