Hello, I have been pondering an error I have had for a few days now and I just cannot seem to figure out the problem. I have an abstract base class called Entity which my PlayerEntity class is inheriting from. Entity has a function called setPosition and takes no parameters I am trying to use the setPosition function in my PlayerEntity's constructor however when I do I get a window that says Debug Assertion Failed! and then says vector subscript is out of range. I have narrowed down the problem to my setPosition function. Thank you for any help.
Entity::setPosition:
void Entity::setPositon(){
//set the choords of the vertecies on the vertex array
m_sfEntityBox[0].position = sf::Vector2f(m_sfPosition.x, m_sfPosition.y);
m_sfEntityBox[1].position = sf::Vector2f(m_sfPosition.x + m_sfSize.x, m_sfPosition.y);
m_sfEntityBox[2].position = sf::Vector2f(m_sfPosition.x + m_sfSize.x, m_sfPosition.y + m_sfSize.y);
m_sfEntityBox[3].position = sf::Vector2f(m_sfPosition.x, m_sfPosition.y + m_sfSize.y);
}