Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
name_from_command #399982
04/24/12 17:07
04/24/12 17:07
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
Hi,
i`m confused a bit about the function
"name_from_command(STRING* to,char* extension)"

seems the function does not work
the compailer error output is
"name_fom_command" undeclared identifier

and the description of this function is in the german manual
available but not in the english version

can someone explain this to me?

Re: name_from_command [Re: GameScore] #399991
04/24/12 17:50
04/24/12 17:50
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Do you include strio.c?

Re: name_from_command [Re: Widi] #399992
04/24/12 17:53
04/24/12 17:53
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
yes and i can`t find "name_from_command" in strio.c

Re: name_from_command [Re: GameScore] #399994
04/24/12 18:00
04/24/12 18:00
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
You are right. I have this code to extract the *.c filename from the commando string:

str_cpy (temp_str,command_str); // get the main script name

var pos = str_stri(temp_str,".c");
var start = str_chr(temp_str,-pos,' '); // -pos --> search backwards
var end = pos + 1;
var len = str_len(temp_str);

if (end > 0 && end < len)
str_trunc(temp_str,len - end);
if (start > 0)
str_clip(temp_str,start);

if (file_exists (temp_str)) str_cpy (DT_SCRIPT,temp_str);
else DT_SPLASH("Main script not found",dt_font_25);


Maybe you can use that instead of the other

Last edited by Widi; 04/24/12 18:41.
Re: name_from_command [Re: Widi] #400010
04/24/12 19:17
04/24/12 19:17
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
tnx

Re: name_from_command [Re: GameScore] #400058
04/25/12 10:11
04/25/12 10:11
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
I do not know this function. Maybe it was planned, but abandoned before release.

Re: name_from_command [Re: jcl] #400061
04/25/12 10:30
04/25/12 10:30
Joined: Apr 2008
Posts: 245
GameScore Offline OP
Member
GameScore  Offline OP
Member

Joined: Apr 2008
Posts: 245
then you should delete this entry at the manual
and dont confuse the users grin

Last edited by GameScore; 04/25/12 10:30.

Moderated by  aztec, Inestical, Matt_Coles, 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