getKeyText() from string variable

Non-platform specific questions.

getKeyText() from string variable

Postby Bee-Ant » Tue Aug 19, 2008 1:33 pm

How to do it???anyone know???
I have global vars KeyLeft(int), KeyLeftText(string)
here's the code I use :
Code: Select all
loadVars("config.dat","config");
KeyLeft=getKeyText(KeyLeftText);
remapKey(KeyLeft,KEY_LEFT);
remapKey(KEY_LEFT,KeyLeft);

Why the line 2 error??Why can't I get the key text from string variable???What should i do to get key text from it???
:cry: :cry: :cry:
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: getKeyText() from string variable

Postby DarkParadox » Tue Aug 19, 2008 4:49 pm

i think your problem is that in global instead of:

int Keyleft;

it should be:

char*KeyLeft;
User avatar
DarkParadox
 
Posts: 457
Joined: Mon Jan 08, 2007 11:32 pm
Location: USA, Florida.
Score: 84 Give a positive score

Re: getKeyText() from string variable

Postby Bee-Ant » Tue Aug 19, 2008 6:14 pm

Can i remap the key with string variable?the code would be like this then...
Code: Select all
loadVars("config.dat","config");
remapKey(keyLeftText,KEY_LEFT);
//etc etc...

I'll try :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron