Starting with devbuild g4.12pre-232-gf20bbd418 and persisting in pre-242-g4273af800, a folder often cannot be directly loaded, throwing an error when processing text files. There is no issue when loading a .zip file. Running on 64-bit Windows 10 22H2. I've tried saving the files with different line endings (\r only, \n only in addition to Windows standard \r\n) in case that's relevant, but it made no difference.
Attached is an example .pk3 that can show off several errors:
Invalid data encountered for texture (project path)/:textures/test.png
Script error, "(project path)/:textures.txt" line 1:
Texture definition expected, found '‰PNG
TEXTURES in question:
Code: Select all
texture "test_tex", 96, 96 {
Patch "textures/test.png", 0, 0 { }
}
There is a MAP01 using the texture, it works fine when loaded from a .pk3
If TEXTURES is removed, the ZScript file is attempted to be loaded with a different error:
Script error, "(project path)/:zscript.txt" line 1:
Unexpected identifier
Expecting end of file or 'include' or 'extend' or 'class' or 'mixin' or 'struct' or 'const' or 'enum'
Script error, "(project path)/:zscript.txt" line 1:
Unexpected character:
The ZScript file in question:
Code: Select all
version "4.11.0"
#include "zscript/exists.zs"
If I then edit the script file to the following:
Code: Select all
version "4.11.0"
class hello {
void nothing() {
x = 0;
}
}
I don't get the first error, only an unexpected character error:
Script error, "(project path)/:zscript.txt" line 1:
Unexpected character:
And if I instead move the class to the included file and put the #include back in, I get an unexpected end of file error.
Starting with devbuild g4.12pre-232-gf20bbd418 and persisting in pre-242-g4273af800, a folder often cannot be directly loaded, throwing an error when processing text files. There is no issue when loading a .zip file. Running on 64-bit Windows 10 22H2. I've tried saving the files with different line endings (\r only, \n only in addition to Windows standard \r\n) in case that's relevant, but it made no difference.
Attached is an example .pk3 that can show off several errors:
[quote]
Invalid data encountered for texture (project path)/:textures/test.png
Script error, "(project path)/:textures.txt" line 1:
Texture definition expected, found '‰PNG[/quote]
TEXTURES in question:
[code]texture "test_tex", 96, 96 {
Patch "textures/test.png", 0, 0 { }
}
[/code]
There is a MAP01 using the texture, it works fine when loaded from a .pk3
If TEXTURES is removed, the ZScript file is attempted to be loaded with a different error:
[quote]Script error, "(project path)/:zscript.txt" line 1:
Unexpected identifier
Expecting end of file or 'include' or 'extend' or 'class' or 'mixin' or 'struct' or 'const' or 'enum'
Script error, "(project path)/:zscript.txt" line 1:
Unexpected character: [/quote]
The ZScript file in question:
[code]version "4.11.0"
#include "zscript/exists.zs"[/code]
If I then edit the script file to the following:
[code]version "4.11.0"
class hello {
void nothing() {
x = 0;
}
}[/code]
I don't get the first error, only an unexpected character error:
[quote]Script error, "(project path)/:zscript.txt" line 1:
Unexpected character: [/quote]
And if I instead move the class to the included file and put the #include back in, I get an unexpected end of file error.