PDA

View Full Version : Compiling problems


Kalos
01-03-2008, 07:11 PM
I'm having problems in compiling scripts that are giving me a headache. None of the compile programs work for me. KOTOR tool gives me and Error that says "Error: Unable to open the input file". I downloaded HazardX's compiler, and extracted nwscript.nss into the same directory as nwnnsscomp.exe.

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

Quote:
Unable to locate or open Neverwinter Night


This is my script:
void main() {
object oLocker = GetItemPossessor(GetObjectByTag("a_band_c01"));
if (GetIsObjectValid(oLocker)) {
CreateItemOnObject("exiletunic", oLocker);
}
}

I want to put a uti file I made that works and everything titled exiletunic.uti into the exile's room.

Ferc Kast
01-03-2008, 07:24 PM
Did you try compiling it with TSLPatcher? Because it compiled it for me perfectly when I was trying to find the problem of your script.

Kalos
01-03-2008, 07:40 PM
You can compile scripts with TSL patcher?! o_O

Ferc Kast
01-03-2008, 07:48 PM
Yes, it does. :D If one reads the pdf included with the TSLPatcher , one would realize that it can compile scripts (and how to compile them with it). But, who would ever read the readme? :roleyess:

Kalos
01-03-2008, 11:43 PM
I love you.

Thank you so much. :)

stoffe
01-04-2008, 09:00 AM
You can compile scripts with TSL patcher?! o_O

It uses a special version of nwnnsscomp, that tk102 was kind enough to make, to compile scripts (usually after it has done token substitutions in the source code). This compiler utility can be used stand-alone as well though.

The major differences of this version compared to the one that comes with KotorTool is support for constants and simplified file lookup: It will always look for nwscript.nss in the same folder as the nwnnsscomp.exe file, and it will look for include files used by scripts in the same folder as the script it's trying to compile.

Other than that you can run it from the commandline (or set up a macro in your text editor) as usual:
nwnnsscomp.exe -c filename.nss

Darth InSidious
01-04-2008, 01:19 PM
You can also use KotOR Tool's Projet Manager, which I've found much more reliable than HazardX's compiler, in terms of operating on XP computers.