Access violation error when I try to access my the TeamScore array in GameState in HUD
My goal here is to set a HUD object to show a team score. I can access my GameState class but when I try to get a value from my TArray TeamScores the editor crashes and gives me "Access Violation - code c0000005 (first/second chance not available)". TeamScores is public in the GameState header. I'm using version 4.4.3. This is the code in the HUD that is causing the crash or at least what the crash report is pointing too, which is the second line.
Does anybody know why it is crashing?
asked Dec 08 '14 at 12:48 AM in C++ Programming
You need to test that the AFPSGameState pointer is valid after the cast:
answered Dec 08 '14 at 02:03 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here