Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
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
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 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
Dateinamen in Strings #294261
10/17/09 17:37
10/17/09 17:37
Joined: Jun 2008
Posts: 146
Deutschland
M
M4sterm1nd Offline OP
Member
M4sterm1nd  Offline OP
Member
M

Joined: Jun 2008
Posts: 146
Deutschland
Hallo alle mit einnander,

für ein Profilmenu möchte ich dateinamen anzeigenlassen die man anklicken kann und wo dann das Profil durch druck auf den OK-Button das Profil geladen wird.

Es geht erstmal nur um die anzeige des Profils so hab ich es versucht.

Code:
STRING* Profilname_str = "#15";

typedef struct {
char* Profilname_str;
} PROFIL;


function Profilanzeige()
{
	
	txt_for_dir( Profilname_str, "Profil1_*" );
	str_clip(Profilname_str, 8);
	
	TEXT* Profil_1 = { layer = 8; 
			   pos_x = 100; 
			   pos_y = 300; 
			   font = "StencilStd#40"; 
			   string (Profilname_str); 
			   flags = VISIBLE; }
}



Es funzt nicht und ich nehme an das es daran liegt das man bei txt_for_dir halt keinen string angeben kann aber wie geht es denn besser und vor allem so das es funzt.

Ich glaub mir fehlt da nur ne function die ich noch nicht kenne.

pls help

Re: Dateinamen in Strings [Re: M4sterm1nd] #294267
10/17/09 19:06
10/17/09 19:06

F
Fear411
Unregistered
Fear411
Unregistered
F




Re: Dateinamen in Strings [Re: ] #294273
10/17/09 20:08
10/17/09 20:08
Joined: Jun 2008
Posts: 146
Deutschland
M
M4sterm1nd Offline OP
Member
M4sterm1nd  Offline OP
Member
M

Joined: Jun 2008
Posts: 146
Deutschland
Code:
STRING* profilNameStr = "";
FONT* arialFont = "arial#20";

TEXT* profilesTxt =
{
	layer = 8; 
	pos_x = 100; 
	pos_y = 300; 
	font = arialFont; 
	strings = 20;
	flags = SHOW;
}

void showProfiles()
{
	beep();
	txt_for_dir(profilesTxt, "profiles\\profil_*.txt");
}

void main()
{
	video_mode = 8;
	video_screen = 2;
	showProfiles();
}



ja das funzt natürlich mein problem ist allerdings das ich nicht möchte das
"profil_" davor und ".txt" dahinter steht.

wenn ich die ersten 8 zeichen abtrennen will mit str_clip kommt eine fehlermeldung in meinem Programm Invalid arguments

EDIT-------------------------------------

so funzt jetzt auch ohne fehlermeldung nur ein prob hab ich noch er zeigt trotzdem noch "profil_" an.

Code:
STRING* Profilname_str = "";
FONT* Stencil_font = "StencilStd#40";

TEXT* Profil_1 = { layer = 8; 
		   pos_x = 100; 
		   pos_y = 300; 
		   font = Stencil_font; 
		   strings = 5; 
		   flags = VISIBLE; }


function Profilanzeige()
{
	
	txt_for_dir( Profil_1, "Profil1_*.txt" );
	str_clip(Profilname_str, 8);
	

}



wo muss das str_clip(Profilname_str, 8); hin?

Last edited by M4sterm1nd; 10/17/09 22:25.
Re: Dateinamen in Strings [Re: M4sterm1nd] #294312
10/18/09 09:33
10/18/09 09:33

F
Fear411
Unregistered
Fear411
Unregistered
F



Ich schau mir das mal an.

Re: Dateinamen in Strings [Re: ] #294314
10/18/09 09:54
10/18/09 09:54

F
Fear411
Unregistered
Fear411
Unregistered
F




Re: Dateinamen in Strings [Re: ] #298465
11/15/09 10:59
11/15/09 10:59
Joined: Jun 2008
Posts: 146
Deutschland
M
M4sterm1nd Offline OP
Member
M4sterm1nd  Offline OP
Member
M

Joined: Jun 2008
Posts: 146
Deutschland
Hab fast vergessen mich zu bedanken.

funzt

Danke


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