Closed linked3 closed 5 months ago
I know you can use predicates with any of as their condition but still this error is weird
this error actually started happening now unrelated to anything specific I feel like. Not sure if you can even reproduce it. It just says it whenever there is stuff in the functions folder. I have to delete the folder every time to compile.
Describe the bug
Error telling me that the directory is not empty.
Unexpected error causes program to crash OSError [WinError 145] El directorio no está vacío: 'C:\\Users\\me\\AppData\\Roaming\\com.modrinth.theseus\\profiles\\Datapacking\\datapacks\\no-elytra-take-off\\src\\..\\data\\no_elytra_take_off\\functions' Traceback (most recent call last): File "C:\Users\me\anaconda3\Lib\site-packages\jmc\terminal_commands.py", line 62, in compile_ compile_jmc(global_data.config, debug=True) File "C:\Users\me\anaconda3\Lib\site-packages\jmc\compile\compiling.py", line 40, in compile_jmc build(lexer.datapack, config, is_delete, cert_config, cert_file) File "C:\Users\me\anaconda3\Lib\site-packages\jmc\compile\compiling.py", line 288, in build rmtree(folder, statics) File "C:\Users\me\anaconda3\Lib\site-packages\jmc\compile\compiling.py", line 159, in rmtree folder.rmdir() File "C:\Users\me\anaconda3\Lib\pathlib.py", line 1156, in rmdir os.rmdir(self) OSError: [WinError 145] El directorio no está vacío: 'C:\\Users\\me\\AppData\\Roaming\\com.modrinth.theseus\\profiles\\Datapacking\\datapacks\\no-elytra-take-off\\src\\..\\data\\no_elytra_take_off\\functions'
To Reproduce
[Steps to reproduce the behavior]
#static "predicates"
to your main.hjmc{ "condition": "minecraft:random_chance", "chance": 1 }
function works() { if (predicate __namespace__:works) { say "hi"; } else if(predicate __namespace__:should_work_as_well) { say "hello"; } }
Expected behavior
not crash as soon as I add the predicates folder in combination with calling the predicates in an if else block?
Desktop
Screenshot