Jump to content
  • Advertisement
Sign in to follow this  
deEnumerator

measure once, cut many times (?)

This topic is 4701 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've spent awhile trying to fix this, i just dont get it.
#include "Input.h"
#include "SDL.h"


void Input::HandleInput()
{
	if (SDL_PollEvent(&m_event))
		if(m_event.type == SDL_QUIT) QUIT = true;//checks for window closing
}

keystate = SDL_GetKeyState(NULL);

if(keystate[SDLK_RIGHT]){
	if(PADDLEx < 500){paddleVelx = PADDLE_VELOCITYx; return;}// CONDITIONAL MOVE RIGHT
}
else {paddleVelx = 0;}

if(keystate[SDLK_LEFT]){
	if(PADDLEx > 0){paddleVelx = -PADDLE_VELOCITYx; return;}//CONDITIONAL MOVE LEFT
}
else{paddleVelx = 0; return;}

.\Input.cpp(12) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
.\Input.cpp(12) : error C2440: 'initializing' : cannot convert from 'Uint8 *' to 'int'
        There is no context in which this conversion is possible
.\Input.cpp(14) : error C2059: syntax error : 'if'
.\Input.cpp(14) : error C2143: syntax error : missing ';' before '{'
.\Input.cpp(14) : error C2447: '{' : missing function header (old-style formal list?)
.\Input.cpp(17) : error C2059: syntax error : 'else'
.\Input.cpp(17) : error C2143: syntax error : missing ';' before '{'
.\Input.cpp(17) : error C2447: '{' : missing function header (old-style formal list?)
.\Input.cpp(19) : error C2059: syntax error : 'if'
.\Input.cpp(19) : error C2143: syntax error : missing ';' before '{'
.\Input.cpp(19) : error C2447: '{' : missing function header (old-style formal list?)
.\Input.cpp(22) : error C2059: syntax error : 'else'
.\Input.cpp(22) : error C2143: syntax error : missing ';' before '{'
.\Input.cpp(22) : error C2447: '{' : missing function header (old-style formal list?)

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!