Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (dBc), 17,435 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: inkey(String*); questions.... [Re: lostclimate] #307272
01/28/10 10:31
01/28/10 10:31
Joined: Jul 2000
Posts: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
Frankfurt
Just use strings. Chars and char arrays are for those experts - if they are too hard to figure, you most likely won't need them.

Re: inkey(String*); questions.... [Re: jcl] #308639
02/04/10 04:27
02/04/10 04:27
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline
Expert
Locoweed  Offline
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
Originally Posted By: jcl
Lite-C is a programming language.


That's debatable, lol. (I am just kidding, so don't get angry with me)

Don't let those strings kick your butt lostclimate.


Professional A8.30
Spoils of War - East Coast Games
Re: inkey(String*); questions.... [Re: Locoweed] #317060
03/28/10 20:50
03/28/10 20:50
Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
GorNaKosh Offline
Junior Member
GorNaKosh  Offline
Junior Member

Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
I have the similar problem during the last 2 houres so I give this thread a bump. So far I've got it...
Code:
STRING *strLogingPass = "#99";
STRING *strPassHidden= "#99";

TEXT *txt_loginPass = {
	pos_x = 40;
	pos_y = 118;
	layer = 2;
	font = fontStandard;
	strings = 1;
	string (strPassHidden);
}

BOOL checkPass= 0;
void createHiddenPass() {
	while(checkPass== 1) {
		
		var passLen = str_len(strLogingPass);
		var x = 0;
		for(x=0;x<passLen;x++) {
			if(x=0) {
				str_cpy(strPassHidden, '*');
			} else {
				str_cat(strPassHidden, '*');
			}
		}
		
		wait(1);
	}
}

void windowLogin_passIn() {
	
	set(txt_loginPass, SHOW);

	checkPass= 1;
	createHiddenPass();
	var lastkey = inkey(strLogingPass);
	
	checkPass= 0;
	
	if(lastkey == 13) windowLogin_login();
}



This is just one way I've tryed to get that many *'s like the length of the real entered password. Main problem seam to be tha the strings have to be cleared to get the right length values, but then inkey doesn't read the inout anymore. However, I didn't get it work and need a hint to deal with the conversion from the inkey-string to the *'s...

Thx
Gor Na Kosh

Last edited by GorNaKosh; 03/28/10 20:51.
Re: inkey(String*); questions.... [Re: GorNaKosh] #317105
03/29/10 10:47
03/29/10 10:47
Joined: Jul 2000
Posts: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
Frankfurt
At a first glance, the code looks alright, although it can probably be done much shorter. I'm not sure what you mean with clearing the strings. But such questions are better answered in the lite-C forum.

Page 2 of 2 1 2

Moderated by  old_bill, 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