Problem compiling all scrips

Hello

2016 I close my server I saved copies and backups of the module. Now some years later I thought it would be fun to play with my children as they grow into age. But when I try to compile the scripts, I get errors lots of them and some is in original nwn2 scripts like ginc_2da. Line 230 Error: ginc_2da.nss(230): Error: NSC1020: Undeclared identifier “GetNum2DARows” some of them compiles when I compile only the script. When I then compile all scripts, I get error. I must include I am not a scripter when module was up and running, I did have help. And this is happening on many of the scripts. If anyone can help me on the right way, I be happy.

I have tried with both advance script compiler plugin and without.

It’s on NWN 2

I’m just guessing now, but maybe there are include scripts missing? 2da’s that are missing? Maybe you had custom 2da’s with stuff that you don’t have anymore? Stuff in the override folder that were there but now aren’t? Hak paks that were associated with the server that aren’t around? There could be a number of reasons why the scripts won’t compile. Maybe you could post the scripts here that won’t compile. If you do that I think people will be able to help you better to see what might be the problem.

Yes I am guessing something like that as well there is so many scripts that wont compile. But I will start with override as the hak files I do have back up. So I understand you correctly some scripts can be dependent on 2da for compiling?

The thing that puzzles me is that some original scripts wont compile. As ginc_2da.nss

Error: ginc_2da.nss(231): Error: NSC1020: Undeclared identifier “GetNum2DARows”

Error: ginc_2da.nss(276): Error: NSC1020: Undeclared identifier “GetNum2DARows”

Error: ginc_2da.nss(306): Error: NSC1020: Undeclared identifier “GetNum2DARows”

Something like that could be caused by a bad nwscript.nss in your override, check to make sure you don’t have one there.

1 Like

@Drakanoiderna Just out of curiosity I downloaded your script and tried compiling it. It compiles for me.
Like Akhacha said you might have some faulty scripts somewhere messing with things…

EDIT: At one or two times I have had stock scripts being the cause of my own scripts suddenly not compiling anymore for no reason. Those instances were solved by me restarting the toolset. So weird things can indeed happen within the NWN2 toolset sometimes.

1 Like

@Drakanoiderna

I have also seen OC scripts report a compile error if the toolset did not load properly. Closing and reloading the toolset and trying again has helped me before.

Also, an error in a large homebrew “include” file can cause errors, which may need recompiling separately before compiling all scripts.

Edit: Looks like @andgalf and I posted similar idea at the same time about restarting the toolset. :slightly_smiling_face:

1 Like

@Drakanoiderna Like Lance says here. Try that. Recompile the include script you posted here, then recompile ALL the scripts that use this include script. I mean, the include script compiled for me, so there seems to be nothing wrong with it…

EDIT: It can be tedious, I know, but I believe it to be pretty important if you don’t want to mess things up.

1 Like

Thanks all i will check override and compile the one by one.

Well after 4h compiling and trying to fix it, it was not working. I did try down loading a mod from vault and it had same problem so I reinstall. What i think, was that something with the install was wrong. So I did get nwn2 on GOG. Now all works fine.

1 Like