Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
0 registered members (), 984 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
read level-of-difficulty from standard input #220933
08/10/08 21:37
08/10/08 21:37
Joined: Jun 2008
Posts: 40
pfeldman Offline OP
Newbie
pfeldman  Offline OP
Newbie

Joined: Jun 2008
Posts: 40
I'd like to be able to read a level-of-difficulty (1-20) from the player. It seems as though file_var_read() could be used to do this if the user types the numerical value into a file, but this would be a rather ugly interface. Is there a simple mechanism for reading a numerical value from the keyboard?

Dr. Phillip M. Feldman

Re: read level-of-difficulty from standard input [Re: pfeldman] #220935
08/10/08 21:57
08/10/08 21:57
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
inkey()?
or key_0 ... key_9?

Last edited by Joozey; 08/10/08 21:58.

Click and join the 3dgs irc community!
Room: #3dgs
Re: read level-of-difficulty from standard input [Re: Joozey] #221451
08/14/08 03:35
08/14/08 03:35
Joined: Jun 2008
Posts: 40
pfeldman Offline OP
Newbie
pfeldman  Offline OP
Newbie

Joined: Jun 2008
Posts: 40
inkey() is perfect. I did not initially find this function because it is in the string manipulation section of the manual instead of the input/output section.

Thanks!

Phillip


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

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