Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 11/19/25 10:10
MRC.c and WFO
by 11honza11. 11/18/25 15:22
webGL
by Ice2642. 11/17/25 21:27
Camera always moves upwards?
by NeoDumont. 11/17/25 09:56
Future of ZorroHFT
by TipmyPip. 11/16/25 13:52
COT Download with Quandl does not work
by Petra. 11/15/25 09:35
Training with the R bridge does not work
by Petra. 11/15/25 09:31
Zorro 2.70
by jcl. 11/15/25 08:43
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, Quad), 7,166 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
SkinnyApe, tritom, sheliepaley, Blueguy, blobplayintennis
19179 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