Folder loading mostly broken
Posted: Fri Dec 29, 2023 11:28 am
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:
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:
If I then edit the script file to the following:
I don't get the first error, only an unexpected character error:
Attached is an example .pk3 that can show off several errors:
TEXTURES in question:Invalid data encountered for texture (project path)/:textures/test.png
Script error, "(project path)/:textures.txt" line 1:
Texture definition expected, found '‰PNG
Code: Select all
texture "test_tex", 96, 96 {
Patch "textures/test.png", 0, 0 { }
}
If TEXTURES is removed, the ZScript file is attempted to be loaded with a different error:
The ZScript file in question: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:
Code: Select all
version "4.11.0"
#include "zscript/exists.zs"Code: Select all
version "4.11.0"
class hello {
void nothing() {
x = 0;
}
}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.Script error, "(project path)/:zscript.txt" line 1:
Unexpected character: