Jump to content

Home

Compiling .nss Scripts


Recommended Posts

Problem 1: While trying to compile a script in KotOR Tool's Project Manager, I got an error that said it could not find the .ncs version of my file, has anyone had this error and does anyone know how to resolve this issue?

 

Problem 2: When using nwnnsscomp.exe, the cmd prompt says that it compiled the file but the file doesn't show up on my computer, again any help would be appreciated.

Link to comment
Share on other sites

Originally posted by jmac7142

Problem 2: When using nwnnsscomp.exe, the cmd prompt says that it compiled the file but the file doesn't show up on my computer, again any help would be appreciated.

 

If you can post the content of your command prompt, it would be helpful. To do this, first try to compile your script. Then right-click on the title bar of the command prompt window. You should be able to select Edit -> Select All then choose Edit -> Copy. This will copy the entire command prompt window to your clipboard. Press Ctrl+V to paste it into your post.

Link to comment
Share on other sites

Originally posted by jmac7142

Problem 1: While trying to compile a script in KotOR Tool's Project Manager, I got an error that said it could not find the .ncs version of my file, has anyone had this error and does anyone know how to resolve this issue?

 

Problem 2: When using nwnnsscomp.exe, the cmd prompt says that it compiled the file but the file doesn't show up on my computer, again any help would be appreciated.

 

Does your script contain either a main() or a StartingConditional() function? If not it's an include file and can't be compiled directly.

 

You'll have to compile the scripts that use the include file instead (i.e. the code contains an #include "filename" directive with the name of your script).

Link to comment
Share on other sites

Originally posted by tk102

If you can post the content of your command prompt, it would be helpful. To do this, first try to compile your script. Then right-click on the title bar of the command prompt window. You should be able to select Edit -> Select All then choose Edit -> Copy. This will copy the entire command prompt window to your clipboard. Press Ctrl+V to paste it into your post.

 

I think I'm having a similar issue:

 

[size=2]
C:\Documents and Settings\Mono>nwnnsscomp -c -g 2 C:\Gotochange.nss
Lookup path root set to: C:\Program Files\LucasArts\SWKotOR2\
Loaded nwscript.nss via key file lookup
Compiling: Gotochange.nss
Total Execution time = 31 ms
[/size][/Code]

 

But no compiled script shows up.

Link to comment
Share on other sites

A workaround is to use the Torlack compiler, and to place a nwscript.nss (fixed if necessary!) from KotOR2 into the same directory.

 

 

The command line would then be

 

nwnnsscomp -v1.00 gotochange.nss

 

 

Spoiler added to help prevent newbie confusion.

 

Honestly, nothing beats this rigorous way of compiling. No batch file. No wildcards. Original compiler. No problems.

Link to comment
Share on other sites

Originally posted by Darth333

Can you post the script you are trying to compile?

 

It's the one you sent me a while ago:

 


void main()
{
object oGoto=GetObjectByTag ("g0t0");
ChangeObjectAppearance(oGoto, 671 );
AddMultiClass (CLASS_TYPE_COMBATDROID, oGoto );
}
[/Code]

 

[Color=Red][u]Edit[/u][/Color]

 

Anyone experiencing a similar problem may wish to try re-extracting their nwscript.nss to whichever folder you needed to put it in. I can't garauntee (sp?) that this will work but I can compile scripts now at least. 'Worth giving a shot.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...