Page 1 of 1

getKeyText() from string variable

PostPosted: Tue Aug 19, 2008 1:33 pm
by Bee-Ant
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:

Re: getKeyText() from string variable

PostPosted: Tue Aug 19, 2008 4:49 pm
by DarkParadox
i think your problem is that in global instead of:

int Keyleft;

it should be:

char*KeyLeft;

Re: getKeyText() from string variable

PostPosted: Tue Aug 19, 2008 6:14 pm
by Bee-Ant
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