Having some errors while trying to log out Tank Name

At first, everything worked as intended but after a second compilation a piece of code that worked previously started giving off errors for seemingly no reason. I thought it might have been a problem with an unreal engine, so I closed it and tried to reopen, but it said that I needed to rebuild my project manually from VS, so I did just that. Took me an hour and a half to realize that the problem was in that piece of code all along (even though I still have no idea why it worked before but gives off errors now). I decided to not log out the name of the tank that aims since that part produces the problem even though I did everything how it was shown in the tutorial.


Like this, it doesn’t produce any errors


But when I do something like this


Error log like this happens

I would appreciate it if someone elaborated what exactly is going on here. I am working on UE 4.18

Edit: Ok, I have noticed the problem before I finished writing this post, and I feel so stupid right now. I didn’t notice that I need to put * to dereference the name. Holy moly this is embarrassing, but my mistake still doesn’t answer the question as to how this thing compiled and worked in the first place when it had a mistake, to begin with. Magic, I guess…

Edit2: This hurts so bad, lol…

Edit3: Don’t forget to dereference your pointers, boys’n’girls! Or you will end up searching for your nose for one and a half hours…

1 Like

Privacy & Terms