Aller au contenu

Photo

ginc_trigger problem


  • Veuillez vous connecter pour répondre
15 réponses à ce sujet

#1
andysks

andysks
  • Members
  • 1 651 messages

Hi all. I was writing a script today with the ginc_trigger included, and the compiler gave me an error on line 239: Undeclared Identifier CombatCutsceneSetup. I opened up another script that worked fine, recompiled and gave the same error. What went wrong here? Did I accidentally mess the ginc_trigger up?

By the way, a few lines up the script the CombatCutsceneSetup is declared.

int bCombatCutsceneSetup = GetLocalInt(OBJECT_SELF, "CombatCutsceneSetup");



#2
Dann-J

Dann-J
  • Members
  • 3 161 messages

"bCombatCutsceneSetup" has certainly been declared as an integer, but "CombatCutsceneSetup" hasn't.

 

To "b" or not to "b" - that is the question...



#3
andysks

andysks
  • Members
  • 1 651 messages

I guess to "b" :). But in any case, what happens if a stock script gets messed up? And not one like gc_check_gold for example... but a ginc. Do I just recompile it when it's fixed? Or I shouldn't touch that button :D?



#4
rjshae

rjshae
  • Members
  • 4 497 messages

It looks like it should be including ginc_cutscene where CombatCutsceneSetup is defined. Are you overriding either include file?



#5
andysks

andysks
  • Members
  • 1 651 messages

Hmm, no. My override folder is empty except some non harmful stuff, i am certain of this.



#6
Morbane

Morbane
  • Members
  • 1 883 messages

generally the toolset wont let a builder save changes to stock scripts - i am fairly sure there is no way to turn off the message that asks if you wish to save the altered file under a new name or location.

 

also saving a file with the same name if you manage to do so will result in 2 files differentiated by date - you will notice an example of this with the gb_comp_* varieties all having the same name but minor changes to the code. 

 

so in essence there is a twofold safety structure - check your mod folder for duplicates as they might not show up in your scripts list due to duplicate names

 

also check the global script/conv "open" window list.


  • andysks aime ceci

#7
andysks

andysks
  • Members
  • 1 651 messages

I'm really confused right now. ginc_cutscene is included on my ginc_trigger, and there's no script to be found on my campaign folder, or any of my mods with the keyword "trigger". I name my trigger scripts with a "tr". This is how my my ginc trigger looks actually.

http://pastebin.myrror.net/2666

 

Again, 239 gives the error.



#8
andysks

andysks
  • Members
  • 1 651 messages

All right. I went to another area and tested a cutscene that start with a speak trigger, which has the gtr_speak_node. The gtr_speak_nde has ginc_trigger as an include, and the cutscene fired correctly. Of course this proves nothing, since in my experience, if a script once works and it's not recompiled will always work. But I am certain that if I were to recompile the gtr_speak:node (not that I will), it would say that ginc_trigger has an error on 239. The good news is of course that previous triggers using the gtr_speak_node, which is the vast majority, have no problem. I just don't get how it happened. A trigger fired last week with a custom script that had ginc_trigger included, and I am quite certain that I didn't do anything weird since then to mess it up.



#9
rjshae

rjshae
  • Members
  • 4 497 messages

Mmm, you could try creating a new module with a single script that only includes ginc_cutscene and has a single routine that only calls CombatCutsceneSetup, then see if it compiles okay. If it does compile, that might be a clue.



#10
andysks

andysks
  • Members
  • 1 651 messages

Hmm, now I'm going nuts. Your suggestion was good. The test on another module worked. With the whole ginc_trigger included, and not just the CombatCutsceneSetUp called. Actually, the whole script worked. The same that doesn't work on the main work. So... if the ginc_trigger has actually no problems, why does it have problems on my main work? Confused. Is there a possibility that a crash on the toolset saved files somewhere... overriding the functioning ginc_trigger? I don't know. I just have to think of every possibility no matter how crazy it might sound.



#11
kevL

kevL
  • Members
  • 4 070 messages

check for a nasty duplicate include in: override, installation folder, module folder, campaign folder ...


  • andysks aime ceci

#12
andysks

andysks
  • Members
  • 1 651 messages

So I found a weird thing right now, as KevL was responding. There is a ginc_cutscene in my campaign folder... how it got there no idea. Thing is, bare with me on this insanity please, it is blank and non-compiled. I guess the ginc_trigger, was thinking that it should include this one instead of the global one... and long story short, a chain of events unraveled. By deleting the blank ginc_cutscene from my campaign folder though... it gave me another error. Failed to open script ginc_cutsene. So I'm thinking... if the blank one is gone, why won't it call the stock one?



#13
andysks

andysks
  • Members
  • 1 651 messages

Saved module and reopened, script compiled. Oh, the joy! I was afraid stock things were messed. How the duplicate got there is still a mystery... but the happy ending leaves no room for such research. Thanks a lot for all the info. You were all again a great help.



#14
kevL

kevL
  • Members
  • 4 070 messages

i get those duplicates *all the time* if I'm not careful -- I think they happen whenever an include is merely opened by the toolset's script editor

 

just another reason to compile from a 3rd party editor ala Skywing's ASC ...



#15
andysks

andysks
  • Members
  • 1 651 messages

That would explain. I did a lot of reading the previous week on some of the includes, to see how the system works in some instances that interested me. So maybe it got there from that. At least I know now. Since I never touch a stock script, when something like that happens, it means duplicate!!! :D



#16
ColorsFade

ColorsFade
  • Members
  • 1 270 messages

So I found a weird thing right now, as KevL was responding. There is a ginc_cutscene in my campaign folder... how it got there no idea. Thing is, bare with me on this insanity please, it is blank and non-compiled.

 

Andy,

 

I've written about this before, but it bears repeating: If you run into an issue where stock script is throwing a compiler error when it's included in one of your scripts, the issue is usually the manifestation of the "blank" scripts. 

 

These scripts happen (at least to me) on toolset crashes. Mine get put in the main NWN2 installation directory, but it can happen in the campaign folder too. 

 

Just know: when a stock, compiled script or a stock library suddenly gives you trouble "out of the blue", for no reason at all, start hunting for blank scripts. That's the culprit. 


  • Morbane aime ceci