Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Ayumi), 662 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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 | chip programmers | 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