I have been following "Game From Scratch" tutorials on building a game but my script won't build.
I got to step 6 here: http://www.gamefroms...ion-Part-6.aspx
I get the following errors:
playerpaddle.cpp(32): error C2039: 'IsKeyDown' : is not a member of 'tagINPUT'
c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winuser.h(5332) : see declaration of 'tagINPUT'
playerpaddle.cpp(36): error C2039: 'IsKeyDown' : is not a member of 'tagINPUT'
c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winuser.h(5332) : see declaration of 'tagINPUT'
playerpaddle.cpp(40): error C2039: 'IsKeyDown' : is not a member of 'tagINPUT'
c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winuser.h(5332) : see declaration of 'tagINPUT'
1>c:\users\dave\c++\pang\playerpaddle.cpp(54): error C2064: term does not evaluate to a function taking 1 arguments
[/quote]
Its related to this :
void PlayerPaddle::Update(float elapsedTime)
{
if(Game::GetInput().IsKeyDown(sf::Key::Left))
{
_velocity-=3.0f;
}
if(Game::GetInput().IsKeyDown(sf::Key::Right))
{
_velocity+=3.0f;
}
if(Game::GetInput().IsKeyDown(sf::Key::Down))
{
_velocity = 0.0f;
}
if(_velocity > _maxVelocity)
_velocity = _maxVelocity;
if(_velocity < -_maxVelocity)
_velocity = -_maxVelocity;
sf::Vector2f pos = this->GetPosition();
if(pos.x <= GetSprite().GetSize().x/2 ||
pos.x >= (Game::SCREEN_WIDTH - GetSprite().GetSize().x/2))
{
_velocity = -_velocity;
}
GetSprite().Move(_velocity * elapsedTime, 0);
}
What does the error mean so i can work out how i fix it =/ ?
Thanks