Aller au contenu

Photo

Module Script Error


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

#1
Jonathan Seagull

Jonathan Seagull
  • Members
  • 418 messages
Okay, so I'm working on adding a new follower to the main campaign.  As per the Follower Tutorial, I've created a module script which I've included below.  I keep receiving an "Invalid declaration type" error on line 20 (which I've bolded here).  I'm sure I'm probably missing something obvious, but I've read the tutorials as well as any similar threads here and elsewhere that I could find, and I can't seem to figure it out.  Any help would be greatly appreciated.  My module script, in its entirety, is as follows:

#include "utility_h"
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);  //Allows the follower to gain XP
            AddCommand(oFollower, CommandJumpToLocation(GetLocation(GetHero())));   //Ensures follower appears at PC's location.
            SetFollowerState(oFollower, FOLLOWER_STATE_ACTIVE);  //Adds follower to the active party
            break;
        }
    }
}
case EVENT_TYPE_MODULE_GETCHARSTAGE:
{
   // Overlay the existing stage with my stage
   // "my_char_stage" is the resource name of the overlay area
   // "partypicker" is the name of the default GDA
   SetPartyPickerStage("my_char_stage", "partypicker");
   break;
}

#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
Your bracketing is wrong.

The 2 closing brackets before the bolded line should be after the closing bracket in the end.

#3
Jonathan Seagull

Jonathan Seagull
  • Members
  • 418 messages
Thanks, it compiled successfully! Now I can continue with my mod and cause more errors in no time.  Image IPB

Modifié par Jonathan Seagull, 18 août 2010 - 07:46 .