Hi, sorry for posting rather rudimentary questions, but my search results are getting flooded with blueprint rather than c++.
I wish to get my active gamemode and trigger a function in it from my character, is there a function or pointer that already gets or holds a reference to the gamemode?
If not, how do I get it?
no suitable constructor exists to convert from "ATribesmenGameMode *" to "TWeakPtr<ATribesmenGameMode, ESPMode::NotThreadSafe>" Tribesmen X:\Unreal\Unreal Projects\Tribesmen\Source\Tribesmen\TribesmenCharacter.cpp
How do I make a pointer towards an instance of a custom class?
9 out of 10 crashes are nullptr related so you are probably calling the function before any World is present or you use the variable before it has been set. Whenever you declare a pointer you then need to ensure that it is set so it is often easier to just get it from somewhere else whenever you need it unless if you need the variable very frequently like on tick.