neverwinter.nim
neverwinter.nim copied to clipboard
CLI tools and nim library used in Neverwinter Nights: Enhanced Edition development
## Testing Tested with void main() ``` { if (FALSE && GetIsObjectValid(GetModule())) { PrintString("1. 'if (FALSE && GetIsObjectValid(GetModule()))'. This is a dead branch."); } if (GetIsObjectValid(GetModule()) && FALSE) { PrintString("2....
To repro, run the following snippet in the script console (or compile as an nss file): `if (unknown_identifier()) PrintString("Check the error code!");`
Uncommenting either line in the attached mismatch.nss will correctly trigger a type mismatch error upon compiling. However the error is otherwise ignored when the file is parsed and eventually skipped,...
Right now it just gives you back a strref for the first error it finds, or 0 if it compiled successfully. CScriptCompiler should be able to give a list of...
While the case of ``` void some_function(); int some_function() { return 10; } void main() { PrintInteger( some_function() ); } ``` is properly detected with a `mismatched parameters` error message,...
@Daztek tracked down the cause to [this](https://github.com/niv/neverwinter.nim/blob/master/neverwinter/nwscript/native/scriptcompidentspec.cpp#L825-L829)
The new script compiler fails when trying to compile scripts that ingest the PRC's include files. File I'm trying to compile [skny.zip](https://github.com/niv/neverwinter.nim/files/13979875/skny.zip) PRC include files I'm compiling against. [prc_include_files.zip](https://github.com/niv/neverwinter.nim/files/13979895/prc_include_files.zip) Specific...
### Description This feature was added in the nwnsc and was useful for the language server. It would be neat to have it available in the nwn_script_comp as well.
Script example of something that should work: ``` void main() { int nCount; for (nCount = 1;GetIsObjectValid(GetNearestObjectByTag("WP_PEASANT_EXIT",OBJECT_SELF,nCount));nCount++); // Do more things here... } ``` Works with ; replaced by {}...
Running self-built neverwinter 1.6.3 (core-master/d1a3a5, nim 2.0.0) on Windows 11. Attempting to output to stdout fails, as below: ``` > nwn_gff -i module.ifo.json -k gff IFO V3.2fatal.nim(53) sysFatal Error: unhandled...