You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import statements allows usage of ./ as the current file's directory. It resolves to CLEO/MegaMod/extra/ in addon.js and to CLEO/MegaMod/ in index.js.
SDK commands allows ./ too. But it always resolves to the index.js directory, regardless of the file location.
addon.js
import'./model.mjs';// worksDynamicLibrary.Load('./lib.dll');// does not work, `CLEO/MegaMod/lib.dll` does not existDynamicLibrary.Load('./extra/lib.dll');// works
The text was updated successfully, but these errors were encountered:
SDK command path allows CLEO\ prefix to be resolved as a path to CLEO directory. In imports there is no such logic, it resolves relative to current working directory (game root):
addon.js
import'CLEO/MegaMod/extra/model.mjs';// does not work if CLEO folder is not in rootDynamicLibrary.Load('CLEO/MegaMod/extra/lib.dll');// works
complex scripts could be organized in folders and subfolders. For example
import statements allows usage of
./
as the current file's directory. It resolves toCLEO/MegaMod/extra/
inaddon.js
and toCLEO/MegaMod/
inindex.js
.SDK commands allows
./
too. But it always resolves to theindex.js
directory, regardless of the file location.addon.js
The text was updated successfully, but these errors were encountered: