Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by kwyx. 08/15/22 04:54
Workshop examples crash
by yoriz. 08/14/22 16:27
Zorro_setup.exe detected with virus
by yoriz. 08/14/22 16:17
Bulk-parse CSV files from whole directory
by jack_the_whack. 08/13/22 07:57
ARM support for Zorro?
by AndrewAMD. 08/11/22 19:54
DeepLearn script
by jcl. 08/10/22 12:58
AUM Magazine
Latest Screens
DEAD TASTE
Tactics of World War I
Hecknex World
Scheherazade's Journey
Who's Online Now
1 registered members (kwyx), 413 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
yoriz, Five_w4ys, kwyx, RandomWalker, boony
18816 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
History & HistoryFolder #484520
11/06/21 22:57
11/06/21 22:57
Joined: Jun 2013
Posts: 1,591
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,591
Hi @jcl,

If the History variable is not set, the manual says it defaults to the History subfolder.

This appears to be incorrect if HistoryFolder is set in Zorro[Fix].ini. In that case, History defaults to that HistoryFolder, as expected.

This appears to be the only case that HistoryFolder affects History. If the History variable is set, HistoryFolder appears to be ignored.

If History includes a relative path, it is relative to the Zorro folder. This allows specifying a subfolder of History via, f.i., "History\\subfolder\\*.t6".

I would like to be able to use History to specify subfolders of HistoryFolder, in this same way. Is there a way to do that?

If not, can History be enhanced to default to HistoryFolder if specified, so that one could then do, f.i., "subfolder\\*.t6" to point History to HistoryFolder\subfolder\*.t6?

Thanks.

Re: History & HistoryFolder [Re: DdlV] #486209
06/23/22 23:23
06/23/22 23:23
Joined: Jun 2013
Posts: 1,591
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,591
Hi @jcl,

I think in any case History should be initialized to the value of HistoryFolder.

In addition, can History's value be included in the Performance Report as a record of what History was used?

Thanks.

Re: History & HistoryFolder [Re: DdlV] #486213
06/24/22 10:00
06/24/22 10:00
Joined: Jul 2000
Posts: 27,871
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,871
Frankfurt
That makes sense. I've put it on the todo list and we'll implement it in a future version.

Update: I have been informed that it is already so. History uses the HistoryFolder unless you enter some other folder. For a subfolder of a different history folder, you must enter the full path.

Re: History & HistoryFolder [Re: DdlV] #486215
06/24/22 23:42
06/24/22 23:42
Joined: Jun 2013
Posts: 1,591
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,591
Hi @jcl,

I just ran a few tests on 2.48:

- Fresh install. Select New Script. At the end of the template that comes up, add "printf("\nHistory=%s", History);". Save. Click Test. Zorro crashes (window just disappears). Log file is 0 bytes.

- Restart Zorro. Add "History="whatever";" before the printf. Save. Click Test. "History=whatever" prints.

- Copy Zorro.ini to ZorroFix.ini. In ZorroFix.ini change HistoryFolder to "somewhere". Restart Zorro. Click Test. Zorro complains there's no history for EUR/USD in somewhere, then prints "History=somewhere".

- Comment out the "History="whatever":" statement. Save. Click Test. Zorro complains there's no history for EUR/USD in somewhere, then prints "History=".

Seems not quite right...

Thanks.

Re: History & HistoryFolder [Re: DdlV] #486217
06/25/22 18:53
06/25/22 18:53
Joined: Apr 2008
Posts: 556
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 556
Austria
What seems not quite right? The crash?

When you print something without setting it before, it is an empty pointer. It will of course crash.

Re: History & HistoryFolder [Re: DdlV] #486223
06/27/22 05:48
06/27/22 05:48
Joined: Jun 2013
Posts: 1,591
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,591
Thanks @Petra. Based on @jcl's comment above, History should be initialized to HistoryFolder's value, therefore should not be an empty pointer, therefore should not crash! It appears that History is in fact not being initialized...

Re: History & HistoryFolder [Re: DdlV] #486224
06/27/22 08:05
06/27/22 08:05
Joined: Apr 2008
Posts: 556
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 556
Austria
History is a string to be set by the user. It has no content when you dont set it. And when you set it it defaults to the historyfolder unless you explicitly set a different folder.

https://zorro-project.com/manual/en/script.htm

Re: History & HistoryFolder [Re: DdlV] #486227
06/27/22 15:07
06/27/22 15:07
Joined: Jun 2013
Posts: 1,591
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,591
Thanks @Petra. Actually, the linked page is labelled "Predefined Strings" and says History has a default value when not set by the user. This simply appears not to be the case. At least not completely. It appears to take a non-default HistoryFolder value, but appears to be uninitialized when HistoryFolder is its default "History". I believe it should be initialized in all cases, no?

Re: History & HistoryFolder [Re: DdlV] #486231
06/30/22 01:32
06/30/22 01:32
Joined: Jun 2013
Posts: 1,591
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,591
Hi @jcl. Not sure if you continued following this thread. Thanks for @Petra's help! But it still appears there's a problem/bug in the initialization of History.

Re: History & HistoryFolder [Re: DdlV] #486232
06/30/22 07:18
06/30/22 07:18
Joined: Jul 2000
Posts: 27,871
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,871
Frankfurt
What problem do you have still?

Page 1 of 2 1 2

Moderated by  Petra 

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