Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (EvanTJ), 8,302 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
inkey #183158
02/10/08 15:18
02/10/08 15:18
Joined: Mar 2002
Posts: 1,774
Magdeburg
F
FlorianP Offline OP
Serious User
FlorianP  Offline OP
Serious User
F

Joined: Mar 2002
Posts: 1,774
Magdeburg
The returnvalue of the inkey-function doesnt work as described in the manual.
with
Code:

result = inkey(debug_str);
str_cat_num(debug_str, "%.0f", result);



I get 122740.
First I expected a type-convertion error, but the function always returns the same value.


I <3 LINQ
Re: inkey [Re: FlorianP] #183159
02/10/08 16:17
02/10/08 16:17
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
Yes I confirm this...however it sets result automatically to the key code.

so ur code should work like this :-

inkey(debug_str);
str_cat_num(debug_str, "%.0f", result);


regards
zazang


I like good 'views' because they have no 'strings' attached..
Re: inkey [Re: zazang] #183160
02/10/08 23:55
02/10/08 23:55
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
...and I'm not sure if %.0f is the correct format string. Give %d a try.

Re: inkey [Re: FBL] #183161
02/11/08 00:01
02/11/08 00:01
Joined: Mar 2002
Posts: 1,774
Magdeburg
F
FlorianP Offline OP
Serious User
FlorianP  Offline OP
Serious User
F

Joined: Mar 2002
Posts: 1,774
Magdeburg
str_for_num, cat_num with %d - same problem


I <3 LINQ
Re: inkey [Re: FlorianP] #183162
02/11/08 06:38
02/11/08 06:38
Joined: Jul 2000
Posts: 28,149
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,149
Frankfurt
You're right. Inkey does not return a value in lite-C, so you need the workaround described by zazang.

This will be fixed.


Moderated by  jcl, Nems, Spirit, Tobias 

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