Closed JoeNotCharles closed 5 months ago
I almost have a fix for this, but it needs some cleanup before I commit it.
The root cause is that NSSEditor.compileCurrentScript doesn't go through the save() / build() path, instead it has custom code to write the compiiled script, which doesn't check settings.disableRIMSaving. (Also NSSEditor.build() doesn't work at all for NCS files - it looks like a "raise ValueError" was pasted into the success path by mistake.)
Thank you for reporting this. There's a few niche scenarios like this where the toolset isn't properly checking that setting.
I tested both the beta release and the PyKotor master branch.
I have a fix at https://github.com/NickHugi/PyKotor/pull/70, but it's a bit wonky. Not sure if it's the correct approach.
On Sun, Mar 10, 2024 at 4:05 PM Benjamin Auquite @.***> wrote:
To clarify is this happening in the beta version or the last DS release version?
— Reply to this email directly, view it on GitHub https://github.com/NickHugi/PyKotor/issues/68#issuecomment-1987347140, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMDPPYQOT3SSJALY6CIAJLYXTDIPAVCNFSM6AAAAABEOPJRDWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGM2DOMJUGA . You are receiving this because you authored the thread.Message ID: @.***>
It's a good starting point at least. Btw the betas are created from the bleeding-edge branch
I'm struggling to reproduce this issue. NSS scripts are compiling fine with that option disabled. Is there any way you can attach errorlog.txt so I can see the stack trace?
EDIT: Sorry I commented this in the wrong place. You mentioned the ValueError was being raised in the incorrect spot. I belive I meant to write this on the PR. Did that come with a stack trace?
I'm struggling to reproduce this issue. NSS scripts are compiling fine with that option disabled. Is there any way you can attach errorlog.txt so I can see the stack trace?
EDIT: Sorry I commented this in the wrong place. You mentioned the ValueError was being raised in the incorrect spot. I belive I meant to write this on the PR. Did that come with a stack trace?
Split that out into https://github.com/NickHugi/PyKotor/issues/71
I messed up the branches and pull requests in my repo. The most up-to-date fix for this is now at https://github.com/JoeNotCharles/PyKotor/tree/fix_compile_script (which includes the commit from the PR I accidentally deleted, plus another cleanup)
The NSS editor will open with the filename set to foo_s.rim/a_script.ncs. (Either it'll have the decompiled source of a_script.ncs, or it'll be blank. Doesn't matter either way.)
The new script will be compiled to an NCS resource and saved over a_script in foo_s.rim, even though "allow saving resources to RIM files" is disabled.