Well the very first two line after the definitions are:
if (GetLocalInt(oPC, "axs_merca")== 1)
if (GetLocalInt(oPC, "axs_merc")== 3)
Indicating you want something to occur if int is either 1 or 3, why not just write it as an or instead.
Then next you go to if the int ==2.
Then you go back to 1 again:
else if (GetLocalInt(oPC, "axs_merc")==1)
{
oTarget=GetHenchman(oPC);
RemoveHenchman(oPC, oTarget);
eEffect = EffectDeath();
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oTarget);
nInt = GetLocalInt(oPC, "axs_merca");
nInt -= 1;
SetLocalInt(oPC, "axs_merca", nInt);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1), GetLocation(oPC));
FloatingTextStringOnCreature("Mercenary Stored", oPC);
CreateItemOnObject("axs_mercr1", oPC, 1);
}
return;
if (GetLocalInt(oPC, "axs_merca")== 0)
and finally to 0, which is not really needed since you could just use and else and do something, since if it's not 1,2, or 3 it's 0. Maybe write it if 0,.. else if 1... else if 2..etc..Sorry that's all I noticed in a quick glance, though I seem to recall a bug with removing dead henchies as you desribe. Are you patched up?
though when I look at it I notice you differentiate merc and merca so it is a different local. Just a bit confusing in that format.
Modifié par ffbj, 01 septembre 2010 - 12:19 .