Author Topic: NPC attack script - compile error  (Read 448 times)

Legacy_Green_Dragon123

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
NPC attack script - compile error
« on: September 03, 2010, 02:00:55 pm »


               I have this one:

void main()
{
    // Change NPC faction to -100 Hatred
    AdjustReputation(GetPCSpeaker(), OBJECT_SELF, -100);
    DetermineCombatRound(GetPCSpeaker());
}

The NPC will the attack the PC when a certain line in the conversation is chosen. However when compiling I get this error:

2010-09-03 14:57:35: Error. 'assassin2' did not compile.
assassin2.nss(5): ERROR: UNDEFINED IDENTIFIER (DetermineCombatRound)

Am I missing something here?

EDIT: Found another one that worked better here: nwn.bioware.com/forums/viewcodepost.html
               
               

               


                     Modifié par Green_Dragon123, 03 septembre 2010 - 01:16 .
                     
                  


            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
NPC attack script - compile error
« Reply #1 on: September 03, 2010, 02:18:34 pm »


               Your script does not compile because it requires the following before the void main()

#include "NW_I0_GENERIC"


FP!
               
               

               


                     Modifié par Fester Pot, 03 septembre 2010 - 01:18 .
                     
                  


            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
NPC attack script - compile error
« Reply #2 on: September 03, 2010, 03:27:44 pm »


               On a totally unrelated note, FP your beard freaks me out....
               
               

               
            

Legacy_Green_Dragon123

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
NPC attack script - compile error
« Reply #3 on: September 03, 2010, 03:34:36 pm »


               

Your script does not compile because it requires the following before the void main()


#include "NW_I0_GENERIC"


FP!


Yes, I figured.
               
               

               


                     Modifié par Green_Dragon123, 03 septembre 2010 - 02:35 .
                     
                  


            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
NPC attack script - compile error
« Reply #4 on: September 04, 2010, 12:59:28 am »


               And how can this be?  Because he is the Kwitzach Hadderach!