Call to a member function getPoints() on bool