Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Zeraan

help with keystate in DirectInput

This topic is 6020 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

in the book TOTWGPG, Andre used this: typedef _DIKEYSTATE UCHAR[256]; _DIKEYSTATE keystate[256]; but when I try to compile it, I get this error: error C2146: syntax error : missing '';'' before identifier ''UCHAR'' so I was wondering what is wrong with this code? Thanks for taking time to help me ______________________________________________ You know your game is in trouble when your AI says, in a calm, soothing voice, "I''m afraid I can''t let you do that, Dave"

Share this post


Link to post
Share on other sites
Advertisement
Yeah, I opened the source file for the program that Andre programmed, and there isn''t a miserable typedef _DIKEYSTATE UCHAR[256];

He just uses UCHAR keystate[256] without telling the reader to... stupid.

______________________________________________
You know your game is in trouble when your AI says, in a calm, soothing voice, "I''m afraid I can''t let you do that, Dave"

Share this post


Link to post
Share on other sites
BTW, your typedef have been wrote in reverse.


// WRONG XX
typedef _DIKEYSTATE UCHAR [256];

// GOOD !!
typedef UCHAR _DIKEYSTATE [256];

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!