Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,619 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Return value of inkey #182403
02/06/08 21:33
02/06/08 21:33
Joined: Feb 2008
Posts: 39
R
RicheyMB2 Offline OP
Newbie
RicheyMB2  Offline OP
Newbie
R

Joined: Feb 2008
Posts: 39
Why is result never == 13 in the following code?

Code:

STRING* strChatInputText;

---

result = inkey(strChatInputText);

if(result==13)
{
AddMessage(strChatInputText);
}



I only want to run AddMessage on an Enter. Running a watch on result and it always has a different value?

Re: Return value of inkey [Re: RicheyMB2] #182404
02/07/08 03:09
02/07/08 03:09
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
Yeah I had a hard time with the same..It was returning some weird 5 digit
values.To fix this,just dont use result = inkey(strChatInputText);
Just use inkey(strChatInputText);
The result var is automatically set to the key code after that.So your code should look like :-

inkey(strChatInputText);

if(result==13)
{
AddMessage(strChatInputText);
}

regards
zazang


I like good 'views' because they have no 'strings' attached..
Re: Return value of inkey [Re: zazang] #182405
02/07/08 22:20
02/07/08 22:20
Joined: Feb 2008
Posts: 39
R
RicheyMB2 Offline OP
Newbie
RicheyMB2  Offline OP
Newbie
R

Joined: Feb 2008
Posts: 39
That solved it.

Cheers zazang. I was getting that 5 digit code, seemed to be related the the text entered, some kind of ASCII thing maybe?

Re: Return value of inkey [Re: RicheyMB2] #182406
02/08/08 01:21
02/08/08 01:21
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
I think its some kind of a handle but not sure.


I like good 'views' because they have no 'strings' attached..

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1