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;
}
Module Script Error
Débuté par
Jonathan Seagull
, août 18 2010 05:16
#1
Posté 18 août 2010 - 05:16
#2
Posté 18 août 2010 - 07:02
Your bracketing is wrong.
The 2 closing brackets before the bolded line should be after the closing bracket in the end.
The 2 closing brackets before the bolded line should be after the closing bracket in the end.
#3
Posté 18 août 2010 - 07:46
Thanks, it compiled successfully! Now I can continue with my mod and cause more errors in no time.
Modifié par Jonathan Seagull, 18 août 2010 - 07:46 .





Retour en haut






