Bug #234
default resources/filesystem is not used if path is in a variable or constant.
Status:
Rejected
Priority:
Normal
Assignee:
AOZ Studio Team
Target version:
-
Start date:
02/15/2020
Due date:
% Done:
0%
Estimated time:
Affected version:
Description
Apparently, it only scans quoted strings in the commands, but not variables / constants.
It needs to check the file access commands real-time, instead of pre-processing the quoted strings.
This example works:
#manifest:"amiga" #speed:"safe" #fps:false Cls 0 : Pen 2 : Paper 0 Track Load "AMOSPro_Examples:Music/Mod.tracker",6 Print "Click mouse button to start music." Print "Click again to exit AOZ." : Print Print "(Track will play until window closed.)" Repeat Until Mouse Key <> 0 Repeat Until Mouse Key = 0 Track Play 6,0 Repeat Until Mouse Key <> 0
This example causes the dreaded "Drive not found" error:
#manifest:"amiga" #speed:"safe" #fps:false Cls 0 : Pen 2 : Paper 0 Trk$="AMOSPro_Examples:Music/Mod.tracker" Track Load Trk$,6 Print "Click mouse button to start music." Print "Click again to exit AOZ." : Print Print "(Track will play until window closed.)" Repeat Until Mouse Key <> 0 Repeat Until Mouse Key = 0 Track Play 6,0 Repeat Until Mouse Key <> 0
Updated by Francois Lionet about 4 years ago
- Status changed from New to Rejected
- Assignee set to AOZ Studio Team
Impossible to do-> the detection of files to include is done by the transpiler, to do what you what would imply complex checking procedure to see if the variable has been changed, including inside of Procedures and Gosubs.
In such case, you KNOW that the path is constant, just add the tag at the beginning of the source (only in v0.9.5 and above...)
#addToFilesystem:"AMOSPro_Examples:Music/Mod.tracker"