I am really stumped here. The currentGameTime variable used to be a call to World()->GetRealTimeSeconds which was causing the crash and I thought maybe I am not allowed to call wold static functions from the tick method. So I moved it out to another function within the AActor that gets called fairly often but it’s still crashing. It’s weird because you can see that both variables contain normal looking float numbers in them. So shouldn’t they subtract and assign to my new float holder just fine?
Is this a threading issue? Too many calls to the same variable? I am in over my head on this one. All I need is to know is the time 2 seconds(m_realTimePlayDelay) before the current running game time at the time of the tick.
I don’t know about VisualStudio, but with VSCode it’s often happens that if it shows the error in a certain line, it’s actually in the previous line, IDK why.
In your case the error is a null pointer and line 85 deals with pointers, so maybe look into it instead of line 86 where the error allegedly is.
Yeah, the m_takeDataRecievedAtSplinePointIndex TMap is always the same length as the Spline and I wasn’t doing the ole -1 at the end of the get length method.
I have been having a lot of problems with errors since working in Unreal. Whatever, I guess.
I am not attempting to subtract a nullptr. That’s why I called it “subtracting floats” in the title and I pinned both of those values in my screenshot so you could see that they aren’t null pointers and are both float values. I am also not doing anything with the return value of line 85 on 86. This seems like a simple error in Unreal’s compilation process or something in Visual Studio. Based on my experience with both Visual Studio and Unreal, I think it’s Unreal’s fault.