Jump to content

Home

Nwnsscomp Output Issue


Recommended Posts

I'm having a problem with NWnsscomp, and I'm wondering if it's just me. What happens is this:

 

Regardless if I'm using KotOR Tool or using NWnsscomp directly from the command line, for certain scripts, it claims that it has compiled without any errors, but no output file is generated. It's seemingly random, except that once a given script file decides not to compile, I can rename, move, or even copy the text into an entirely new script, and it still won't generate any output. This makes me think that it has something to do with the text of the script itself. However, I haven't found any common denominator, such as a certain type of expression or a certain function call that is present in all failed files. From little three line scripts such as:

void Main()
{
object oPC = GetFirstPC();
object myrobes = CreateItemOnObject("jf_missionsrobe", oPC);
ActionEquipItem(myrobes, INVENTORY_SLOT_BODY, TRUE);
}

To an unmodified copy of k_inc_force.nss - they compile, but there's no output.

 

Anybody got any idea what's going on?

Link to comment
Share on other sites

I have experienced this, and have second-guessed myself, but it seems to me that when using kotor tool as a compiler, I have to remember to change the specific output filetype to .ncs. I am convinced on my own part that those "failed" compilations are mostly user-error on my part.

 

I have never used nwnsscomp directly as my compiler, so I cannot speak to that experience.

Link to comment
Share on other sites

I've tried extensively, specifying output as both nss and ncs, and the same scripts refuse to compile. Any idea why the below script would compile with no errors, but generate no output?

void Main()
{
object oPC = GetFirstPC();
object myrobes = CreateItemOnObject("jf_missionsrobe",oPC);
ActionEquipItem(myrobes, INVENTORY_SLOT_BODY, TRUE);
}

Link to comment
Share on other sites

Well, using KTool Text Editor to compile the above script, it compiled to .ncs in about 11ms.

 

Then when I looked for the .ncs file, it was (and is) non-existent :lol:

 

Very strange indeed.... never seen this before. I will have to think about it a bit, but this is curious. I am wondering if it is because of the logic of CreateItemOnObject v. ActionEquipItem... but at this point at a bit of a loss.

Link to comment
Share on other sites

Good news - I've tested an identical file, one saying

void Main()
{
}

and the other saying

void main()
{
}

They both compile fine, but the first doesn't generate any output, while the second does. Absolutely nothing changed other than that; same file, and I didn't even close the KotOR tool text editor between compiles.

 

I think this pins it down; for some reason, scripts with "Main()" compile, but NWnsscomp doesn't generate any output.

 

Qui-Gon, do your results match this?

Link to comment
Share on other sites

Good news - I've tested an identical file, one saying

void Main()
{
}

and the other saying

void main()
{
}

They both compile fine, but the first doesn't generate any output, while the second does. Absolutely nothing changed other than that; same file, and I didn't even close the KotOR tool text editor between compiles.

 

I think this pins it down; for some reason, scripts with "Main()" compile, but NWnsscomp doesn't generate any output.

 

Qui-Gon, do your results match this?

Yes :D I just tested this on your earlier script with the AddEquip scripts, changed Main to main and compiled... and you have a working script that was properly output into my override. It seems that a tiny detail like a "M" where an "m" should be will hose the machine :p

 

Glad you figured it out, take this as confirmation on your problem and solution

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...