mcscript icon indicating copy to clipboard operation
mcscript copied to clipboard

`#file` creates erroneous files in root data pack folder

Open Nixinova opened this issue 4 years ago • 1 comments

Using #file: with content above it creates erroneous files that are placed in the root data pack directory.

Example:

#Header#
#file: ./x
/say hi
#file: ./y
/say hello

When compiled, the following occurs:

 Generated    #Header#.mcfunction
 Generated    .//data/DATAPACK/functions/x.mcfunction
 Generated    .//data/DATAPACK/functions/y.mcfunction

The content above the first #file should either be:

  1. disregarded, or
  2. compiled to a folder in its local directory with the same name as the mcscript filename. E.g., if the example above was in file A.mcscript it should be compiled to .//data/DATAPACK/functions/A.mcfunction, not ./#Header#.mcfunction.

Nixinova avatar Apr 11 '21 05:04 Nixinova

Also, the syntax of .//data (erroneous ./) is a minor issue.

Nixinova avatar Apr 11 '21 05:04 Nixinova