Thanks a bunch, guys. The script itself is fine now, and compiles on its own.
But, here's something interesting:
When I compile the UserDefined script now, I get the same error, but a different line is hilighted: in fact, a line from another file. I kid you not: as I press ctrl+s, a tab with "x0_inc_generic" pops up, and the following line is hilighted, with the same error type as before:
Code: Select all
int GetIsFighting(object oFighting);
Later in that file, GetIsFighting seems to actually be defined. Here's the "definition" I see:
Code: Select all
int GetIsFighting(object oFighting)
{
object oAttack = GetAttemptedAttackTarget();
object oSpellTarget = GetAttemptedSpellTarget();
if(GetIsObjectValid(oAttack) || GetIsObjectValid(oSpellTarget))
{
return TRUE;
}
return FALSE;
}
Now, back to the UserDefined file. Here's the section both of you helped me revise:
Code: Select all
void CheckForDisabledPartyMembers()
{
object oMaster = GetMaster(OBJECT_SELF);
if(oMaster != OBJECT_INVALID)
CheckCreature(oMaster);
int i = 1;
object oHench = GetHenchman(oMaster, i);
while(oHench != OBJECT_INVALID)
{
CheckCreature(oHench);
i++;
oHench = GetHenchman(oMaster, i);
}
}
Could it be that "CheckForDisabledPartyMembers()" can only be used to determine whether or not the caller is in combat, full stop, not including the extra functions I wanted to use, causing the error? I was previously working under the assumption that "CheckForDisabledPartyMembers()" would go ahead and determine whether the NPC is in combat so I could further narrow that criteria, then give an effect if they are in combat with something in particular.
Either way, thanks again. This was the first issue I couldn't resolve with time and Google searches, so hopefully someone can see this one day and solve their problems, also.