Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - PapyRedstone

Pages: [1]
1
Window / Problem with RenderWindow
« on: May 24, 2017, 09:00:15 am »
Hi,
I'm working on a project with some friends using SFML but i'm facing a strange problem i don't understand
Here a link to github https://github.com/PapyRedstone/AIBattleSimulator2000. The problem is on branch detailOfGameImplement.

The problem is in main.cpp(I remove some useless lignes but you can see full code on hiyhub)
Quote
int main() {
  sf::RenderWindow window;
  unsigned currentId = 0;

  Game game;
  window.create(sf::VideoMode(640, 640), "Serveur");

  if (!game.loadFile("ressources/level.txt")) {
    std::cout << "Error loading file" << std::endl;
    return -1;
  }
 
  game.addPlayer(sf::Color::Blue, sf::Vector2f(2, 7));
  game.addPlayer(sf::Color::Red, sf::Vector2f(28, 28));

This code runs the window but create a core dumped when closed

if I call create after  gmae.loadFile the window doesn't launch at all and create a core dumped as well.

I just want to know if you see the problem in my code or if i have to report a bug (or to stop programming  :P)

Thanks in advance

Pages: [1]