Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / confused about dbPrint

Author
Message
Green Fox
19
Years of Service
User Offline
Joined: 9th Jun 2005
Location:
Posted: 30th Mar 2009 23:15


Why doesn't that work? help says it should be able to print text, numbers, variables, and stings.

The real goal here is to get it to work with dbScanCode() so that I can figure out the key commands for a wasd fight camera.
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 31st Mar 2009 02:57 Edited at: 31st Mar 2009 03:00
If you notice, the declaration for dbPrint() is

You are trying to pass in an integer as a char array.

Use dbStr() to convert an integer to a char array.


EDIT:

A good tip is also to include "dinput.h" in your code because it defines the scancodes for all keys. For example, the scancode for 'w' is DIK_W and 's' would be DIK_S.

#ifdef _DEBUG
FixBugs(All);
#endif
Green Fox
19
Years of Service
User Offline
Joined: 9th Jun 2005
Location:
Posted: 2nd Apr 2009 00:27
thanks, all I did was define a float, then make that float = dbScanCode (), worked out fine for testing and figuring out what the wasd scan codes where. I will need the scancodes for other things too, so dinput won't work. like the é

Login to post a reply

Server time is: 2024-09-30 21:37:50
Your offset time is: 2024-09-30 21:37:50