Aller au contenu

Photo

trouble with custom follower module script from the follower tutorial(solved)


  • Veuillez vous connecter pour répondre
Aucune réponse à ce sujet

#1
Caldargo

Caldargo
  • Members
  • 7 messages
Here is my script



#include "utility_h"
#include "wrappers_h"
#include "plt_wg_create_party"   

void main()
{
    event ev = GetCurrentEvent();
    int nEventType = GetEventType(ev);
    switch(nEventType)
    {
        case EVENT_TYPE_PARTYMEMBER_ADDED:
        {
            object oFollower = GetEventObject(ev, 0);
            SetLocalInt(oFollower, CREATURE_REWARD_FLAGS, 0);
            WR_SetFollowerState(oFollower, FOLLOWER_STATE_ACTIVE);

            AddCommand(oFollower, CommandJumpToLocation(GetLocation(GetHero())));   //Ensures follower appears at PC's location.

            if (GetTag(oFollower) == "wg_gina") {               //You must explicitly test for your follower's tag.
                WR_SetPlotFlag(PLT_WG_CREATE_PARTY, WG_GINA_IN_PARTY, TRUE);     //Make sure you use your own flags!
            if (GetTag(oFollower) == "wg_tory") {               //You must explicitly test for your follower's tag.
                WR_SetPlotFlag(PLT_WG_CREATE_PARTY, WG_TORY_IN_PARTY, TRUE);     //Make sure you use your own flags!
            if (GetTag(oFollower) == "wg_brit") {               //You must explicitly test for your follower's tag.
                WR_SetPlotFlag(PLT_WG_CREATE_PARTY, WG_BRIT_IN_PARTY, TRUE);     //Make sure you use your own flags!   
            }

            break;
        }

        case EVENT_TYPE_PARTYMEMBER_DROPPED:
        {
              object oFollower = GetEventObject(ev, 0);

              if (GetTag(oFollower) == "wg_gina") {
                WR_SetPlotFlag(PLT_WG_CREATE_PARTY, WG_GINA_IN_PARTY, FALSE);     //As above, but set false.
              if (GetTag(oFollower) == "wg_tory") {
                WR_SetPlotFlag(PLT_WG_CREATE_PARTY, WG_TORY_IN_PARTY, FALSE);     //As above, but set false.
              if (GetTag(oFollower) == "wg_brit") {
                WR_SetPlotFlag(PLT_WG_CREATE_PARTY, WG_BRIT_IN_PARTY, FALSE);     //As above, but set false.
              }

        }

    }
}


when I save the script I get this error and it fails to compile.

E: 14:57:13 - wg_tory_gina_module_core.nss - wg_tory_gina_module_core.nss(45): Unexpected end compound statement

I looked at line 45 and it is the last line that has this } mark so I don't know what to do here can some one help me out with this please.

Thank you in addvance for any help you can give.:)

Modifié par Caldargo, 05 octobre 2011 - 01:55 .