Primary Expression Error (Help?)

I keep getting an "expected primary-expression before '.' token" on lines 6 and 12. Does anyone know what's wrong? Thanks. I am using SFML and a sprite to make a character move.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 while(window.isOpen())
    {
       sf::Event event;
       while(window.pollEvent(event))
       {
           switch(Event.type)
           {
           case sf::Event::Closed:
               window.close();
               break;
           case sf::Event::KeyPressed:
               if(Event.key.code == Keyboard::Up)
               break;
           }
       }
       window.clear(Color::Black);
       window.draw(playerSprite);
       window.display();
   }
   return 0;
}
Last edited on
You wrote Event but meant event on both lines 6 and 12.
Last edited on
Topic archived. No new replies allowed.