LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   T3-M4's Astromech Droid Center (http://www.lucasforums.com/forumdisplay.php?f=646)
-   -   Nwnsscomp Output Issue (http://www.lucasforums.com/showthread.php?t=207271)

JoFlashStudios 04-29-2011 04:21 PM

Nwnsscomp Output Issue
 
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:
Code:

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?

ChAiNz.2da 04-29-2011 05:41 PM

K1 or TSL?

TSL introduced a syntax error in the nwscript.nss

http://www.lucasforums.com/showthread.php?t=146472

JoFlashStudios 04-29-2011 05:54 PM

KotOR 1.
Sorry I didn't specify.

Qui-Gon Glenn 04-30-2011 05:08 PM

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.

JoFlashStudios 05-08-2011 10:19 AM

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?
Code:

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


Qui-Gon Glenn 05-08-2011 03:37 PM

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.

JoFlashStudios 05-08-2011 03:52 PM

I did some testing, and even if I change it to:
Code:

void Main()
{
}

it doesn't generate any output. Should Main not be capitalized?
I was able to get a nearly identical script to compile, where it was "main()" however.

Qui-Gon Glenn 05-08-2011 05:07 PM

interesting idea on the whole "Main" vs "main"... I have never capitalized main, and I just copy & pasted your script into the editor. I will test this in a minute for you. Wild wacky stuff.

JoFlashStudios 05-08-2011 05:34 PM

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

void Main()
{
}

and the other saying
Code:

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?

Qui-Gon Glenn 05-08-2011 09:58 PM

Quote:

Originally Posted by JoFlashStudios (Post 2777680)
Good news - I've tested an identical file, one saying
Code:

void Main()
{
}

and the other saying
Code:

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

JoFlashStudios 05-08-2011 11:40 PM

Snazzy. Thanks for your help.


All times are GMT -4. The time now is 10:51 PM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.