Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Script Compiler Error

Page: 1 of 1
 brewed4you
01-03-2006, 6:52 PM
#1
I always get this error

Lookup root path set to: C:/NeverwinterNights/Nwn
Error: Couldn't initialize the NwnStdLoader

I am following all the readme's and tutorials but I always get this message. What am I doing wrong?

Appreciate the help. :)
 Darth333
01-03-2006, 7:06 PM
#2
Make sure you are using the right compiler and that you specify which game with Fred's compiler.

But if you want to do this the easy way, you can now compile your scripts directly with Kotor tool :)

Go to the tools menu, select the text editor. Then in the text editor window, go to the script menu, select your game (kotor 1 or kotor 2), make your script and then either go to the script menu and select compile or press F5 .

If you are still getting an error after this, let us know.
 brewed4you
01-03-2006, 7:08 PM
#3
Thanks for the reply Darth333 but I tried Kotor Tool already and it gives me the same error.
 Darth333
01-03-2006, 7:17 PM
#4
Did you check your paths in the path manager (file menu)?

If not, can you post the script you are trying to compile?
 brewed4you
01-03-2006, 7:23 PM
#5
I checked my paths and just thought that the problem might be from using xbox version of Kotor 2? This is the script I'm trying to compile.

AdjustAlignment( GetFirstPC(),ALIGNMENT_DARK_SIDE,1);
 Darth InSidious
01-03-2006, 7:33 PM
#6
Try doing it more like this:

void main()

{
AdjustAlignment(GetFirstPC(),ALIGNMENT_DARK_SIDE,1 );
}

That should work :)
 Det. Bart Lasiter
01-03-2006, 7:34 PM
#7
You need to add a 'void main()' statement and place that function into a scope, try the following:

void main() {
AdjustAlignment(GetFirstPC(), ALIGNMENT_DARK_SIDE, 1);
}
 Darth333
01-03-2006, 7:35 PM
#8
oh I see. well first of all I imagine that your script looks like this:

void main()
{
AdjustAlignment( GetFirstPC(),ALIGNMENT_DARK_SIDE,1);
}


Second, there is a mistake in nwscript.nss in the xbox version (it was fixed in the PC patch 1.0b after tk102 pointed the error to a dev). You can download the fixed version from this thread: http://www.lucasforums.com/showthread.php?t=143681)

You'll find more info about the fix here: http://www.lucasforums.com/showthread.php?t=146472)

Finally, I imagine that you extracted all the scripts from your xbox?
 brewed4you
01-03-2006, 7:37 PM
#9
Thanks for the replies everyone. I have a copy of the fixed nwscript.nss and so far a have copies in my Kotor 2 root folder, my override folder, the folder where I have HazardX's compiler installed and my Kotor Tool folder but it still doesn't seem to want to work. I also tried HazardX's without any success.

Do you think I could just fix all this by buying the PC version?
 Darth333
01-03-2006, 7:53 PM
#10
I compiled several scripts successfully prior to the release of the pc version with hazardx script compiler (I have the xbox version too). If you use this compiler, make sure you use method 3 (from section A) of the tutorial. nwscript.nss has to be located in the same folder as nwnsscomp.exe

However, with kotor tool, you have to use Fred Tetra's script compiler. I don't know about KT but Fred's script compiler should work with the xbox version too. Follow method 1 for non U.S versions.
 brewed4you
01-04-2006, 1:09 AM
#11
Still the same error message, anyone have any more ideas?
 Darth333
01-04-2006, 1:30 AM
#12
Can you tell me what method you are using, which script compiler and the exact way you placed you files on your PC? Just to make sure we are talking about the same thing.
 brewed4you
01-04-2006, 1:33 AM
#13
Okay I'm using HazardX's compiler using method 3 as you suggested. I have a folder containing: nwnnsscomp.exe, nwscript.nss, nsscomp.bat (The batch file you provided), and my scripts. Then I double click the batch file and it doesn't work.
 Razorfish.8
01-04-2006, 9:21 AM
#14
I always get this error

Lookup root path set to: C:/NeverwinterNights/Nwn
Error: Couldn't initialize the NwnStdLoader

I am following all the readme's and tutorials but I always get this message. What am I doing wrong?

I had exactly the same error message when I started using nwnnsscomp again a week ago around the same time I reinstalled kotor2, but unfortunately, I'm not exactly sure what I did to make it stop...

Since you are using the XBox version of the game, maybe it's because you specified -g 2 specifically, and it is looking for the non-existent registry setting that specifies the path to your computer's kotor 2 installation. Have you tried it with just nwnnsscomp.exe -c somescript.nss -o somescript.ncs? Or maybe you need to have some kind of registry setting there regardless? I dunno, just throwing out some possibilities.
 Darth333
01-04-2006, 9:38 AM
#15
You don't need to specify any game with that compiler. But you have to use the v-1.00 switch. Perhaps Fred's would work.

I compiled scripts with only the contents of scripts.bif on my computer before the release of the pc version without problems. You can drop them in any directory along with nwnnsscomp.exe and this .bat file: http://www.starwarsknights.com/forumdl/nsscomp.zip) . However, I believe that Fred's script compiler asks for some specific settings but I could be wrong as I never tried it without the PC version of Kotor2.

If I understand he's getting the same error from both compilers. I really don't know what is causing this :confused:
 brewed4you
01-05-2006, 2:43 AM
#16
Eh still nothing, I give up. Thanks for all the help though. :)
Page: 1 of 1