Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/06/26 07:18
zorro with ccxt?
by opm. 03/03/26 03:17
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 5,052 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 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