Hi,
Please see the attached images.
So, I've built a collision class and I want to display a rectangle object with some text in it when there is a collision between the player and the pickup item.
I got the rectangle shape to appear and disappear perfectly on collision, however when I do the same process for the sf::Text, I get an error in Virtual Studio 2019 that states:
"Unhandled exception at 0x00007FFAB2D169DB (sfml-graphics-d-2.dll) in RPG.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF."
The text draws perfectly in the main function, however, I'd like to return this from the Collision class and create a switch for different messages depending on the item being picked up.
Best,
Wake