I'm not sure if it must be qualified of bug, not even
if it should be corrected.
The integrated compiler of nwtoolset.exe is less strict
than nwnnsscomp.
When a script includes x2_inc_switches.nss (or an
include that itself includes t...), it can't be
compiled with nwnnsscomp, as it declares (line 265)
int SetUserDefinedItemEventNumber(int nEvent)
but defines (line 546)
void SetUserDefinedItemEventNumber(int nEvent)
The toolset has no problem with that, I didn't test the
Bioware stand alone compiler (couldn't set it to work
with wine).
It's in fact a bug in Bioware's include file, but it
disallows the use of nwnnsscomp in that case. For
example, you can't modify and recompile the Henchman
Battle and Inventory AI (that's where I found it).
Logged In: YES
user_id=970263
Oh, I had attached a file, but forgot to check the checkbox.
really basic (!) script that doesn't compile with nwnnsscomp
Logged In: YES
user_id=688907
Thanks for the report. I'm going to put this at a low priority as I think it's
not too severe a problem (I assume making a module copy of the script
and changing the prototype in there works?).
Logged In: YES
user_id=407310
Yes, that works, or at least it does with the stand-alone (nwnnsscomp)
compiler.
Logged In: YES
user_id=970263
> I'm going to put this at a low priority as I think it's
not too severe a problem
Absolutely. I see no problem with that. As I say, I'm not
even sure nwnnsscomp should have the buggy behaviour of
Bioware's toolset.
But I thought it was better to signal it.
Logged In: YES
user_id=1124790
I noticed this behaiviour, too. I suppose the best resolution would be report
an Warning (not an error) but then ignore the error (as does the bioware
compiler).
The idea behind that wish is that you can still correct those reported flaws
within your own scripts, but don't have to wory about those bioware-related
scripting-bugs.
Logged In: YES
user_id=407310
BioWare has fixed x2_inc_switches now, so this specific issue does no
longer occur. However, I've seen it happen with community scripts as
well, and only getting a warning instead of a error might be nice still.
attempted patch to produce warning instead of error
Logged In: YES
user_id=688907
Here's a tiny patch I made in a couple of minutes to
generate a warning instead of an error. I'm not certain
about the correctness of the output at all, but if someone
wants to try it and let me know whether the resulting output
is good, please do.