Jump to content

Home

Compiling problem


Jemek Sunns

Recommended Posts

I'm trying to compile an object placement script, I've downloaded HazardX's compiler, and extracted nwscript.nss into the same directory as nwnnsscomp.exe.

 

I have tried all three compile methods listed here , and they all give me the same result:

 

 

Unable to locate or open Neverwinter Night

 

I'm foxed, as far as I can tell I'm following the steps correctly, any help would be greatly appreciated.

Link to comment
Share on other sites

did you download the bat file in the thread you listed above?

 

if so then make sure you have it nwnscript, and nwnscomp in the same directory. Add your .NSS files to the directory and double click the bat file. It will do everything for you without a problem.

Link to comment
Share on other sites

I suggest using Fred Tetra's compiler. It comes with Kotor Tool. I've had some problems with HazardX'; it didn't compile complex script correctly, and I spent several hours trying to figure out what was wrong the script (while there was something wrong with the compiler).

Link to comment
Share on other sites

Darkkender:

 

I have downloaded the bat file and had them all together, it still gives me the same error, however it also says:

 

Compilation complete: 1/1 file compiled

 

But I see no .ncs file appear in the folder, or in another other folder on my harddrive.

 

Xcom:

 

I'm not entirely sure where the compiler is in KT, I tried placing my script file into a new project and built it, and it gave me an error saying that it could not compile. However I also tried another script file from the source folder of someone elses completed mod and it gave me the same error.

Link to comment
Share on other sites

Fred's compiler is the same directory as Kt.

 

c:\program files\fred tetra\kotor tool\nwnnsscomp.exe

 

(if by any chance it's not there, you can download it from his site)

 

You can simply copy the executable to the location you want. nwscript.nss should be there too. As for bat file, I personally, just use this command:

 

nwnnsscomp -c <scriptname>

 

So far, had no problems with it.

Link to comment
Share on other sites

You could also just use the Project Manager to create a new project with the files you want compiled.

 

  • Open the Project Manager from the Tools menu
  • Choose New Project from the File menu
  • Enter the project name and select the paths to save the project and output files to
  • Drag the .nss files to the Override folder in the treeview or right-click it and select Add Files...
  • Save your project (File | Save Project)
  • Choose Build Project from the Build menu or press F5

 

When you build the project in debug mode, all .nss files will be compiled and copied to the Override folder.

Link to comment
Share on other sites

Thanks for the help guys, but I'm stilling getting errors from both inside KT and just using nwnnsscomp at the command line.

 

Is it possible that it's a problem with my script? I'm going to post it here, if someone could try compiling it I would really appreciate it.

 

Script

Link to comment
Share on other sites

There appears to be a syntax error in your script. I'm not sure why your nsscomp.bat file didn't produce this:

-------------------------------------------
NSSCOMP.bat output Wed 03/02/2005  8:47a 
-------------------------------------------
Compiling: robescript.nss 
robescript.nss(7): Error: Syntax error at  
Leaked PStackEntry (h:\programmieren\vc7\gametools\kotor\nwntools-1.2\_nsclib\nscparserroutines.cpp,5330) 
Leaked PStackEntry (h:\programmieren\vc7\gametools\kotor\nwntools-1.2\_nsclib\nsccontext.cpp,230) 
Leaked PStackEntry (h:\programmieren\vc7\gametools\kotor\nwntools-1.2\_nsclib\nscparserroutines.cpp,4272) 
Compilation aborted with errors 
Total Execution time = 80 ms 
-------------------------------------------
Compilation complete: 0/1 file compiled 
1 file had errors

On line 7 of your code you have this:

   oContainer= CreateObject(CreateObject( OBJECT_TYPE_PLACEABLE, "cont_med012", lContainer);

but you probably meant this:

   oContainer= CreateObject( OBJECT_TYPE_PLACEABLE, "cont_med012", lContainer);
Link to comment
Share on other sites

Well thanks to everyone's help I finally got it to compile. I ended up using KT's project manager and it worked. Oh and TK, just to let you know that syntax error came straight from your post in the placables scripting thread . :)

 

Now, I'd like to have it trigger when the Exile opens the door to the morgue on Peragus, would that be considered a dlg, or something else?

 

Nevermind, found it. :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...