JoFlashStudios Posted April 29, 2011 Share Posted April 29, 2011 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 More sharing options...
ChAiNz.2da Posted April 29, 2011 Share Posted April 29, 2011 K1 or TSL? TSL introduced a syntax error in the nwscript.nss http://www.lucasforums.com/showthread.php?t=146472 Link to comment Share on other sites More sharing options...
JoFlashStudios Posted April 29, 2011 Author Share Posted April 29, 2011 KotOR 1. Sorry I didn't specify. Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted April 30, 2011 Share Posted April 30, 2011 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 More sharing options...
JoFlashStudios Posted May 8, 2011 Author Share Posted May 8, 2011 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 More sharing options...
Qui-Gon Glenn Posted May 8, 2011 Share Posted May 8, 2011 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 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 More sharing options...
JoFlashStudios Posted May 8, 2011 Author Share Posted May 8, 2011 I did some testing, and even if I change it to: 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. Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted May 8, 2011 Share Posted May 8, 2011 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. Link to comment Share on other sites More sharing options...
JoFlashStudios Posted May 8, 2011 Author Share Posted May 8, 2011 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 More sharing options...
Qui-Gon Glenn Posted May 9, 2011 Share Posted May 9, 2011 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 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 Glad you figured it out, take this as confirmation on your problem and solution Link to comment Share on other sites More sharing options...
JoFlashStudios Posted May 9, 2011 Author Share Posted May 9, 2011 Snazzy. Thanks for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.