This is a bug with a mod, but really it's a more general question about diagnosing scar errors with the warnings.log file.

So, I'm playing the Panzer Elite mission Best when I get a fatal scar error:

Code:
08:21:15.35   LuaException::ThrowMessage - Invalid parameter 4 (type expected=AbilityBlueprint, received=nil) in function Command_SquadPosAbility
08:21:15.35   GameObj::OnFatalScarError: Invalid parameter 4 (type expected=AbilityBlueprint, received=nil) in function Command_SquadPosAbility
  Lua             Command.scar                   Ln 1130 (Cmd_Ability)
  Lua             best.scar                      Ln 6086 (Calliope_Fire)
What I don't understand is that the log is telling me that there is an invalid parameter in the Command_SquadPosAbility function. However, both best.scar and Command.scar are default vanilla files from Company of Heroes: OF. So why is this trace showing the problem as occurring in these files if I can play the vanilla campaign without this scar error? They're both using the same function I'm assuming.

I guess my question is where else could a problem be occurring given that the problem does not seem to be at line 1130 or line 6086?

Command.scar:
Code:
1103        if scartype(target) == ST_EGROUP then
1104            Command_SquadEntityAbility(
1105                player,
1106                user,
1107                target,
1108                ability,
1109                skipCostPrereq,
1110                queued
1111            )
1112        elseif scartype(target) == ST_SGROUP then
1113            Command_SquadSquadAbility(
1114                player,
1115                user,
1116                target,
1117                ability,
1118                skipCostPrereq,
1119                queued
1120            )
1121        elseif target == nil then
1122            Command_SquadAbility(
1123                player,
1124                user,
1125                ability,
1126                skipCostPrereq,
1127                queued
1128            )
1129        else
1130            Command_SquadPosAbility(
1131                player,
1132                user,
1133                Util_GetPosition(target),
1134                ability,
1135                skipCostPrereq,
1136                queued
1137            )
1138        end
best.scar:
Code:
6081    function Calliope_Fire()
6082
6083        if SGroup_IsEmpty(sg_calliope) == false then
6084            if SGroup_IsMoving(sg_calliope, ALL) == false then
6085                
6086                Cmd_Ability(sg_calliope, ABILITY.ALLIES.CALLIOPE, targetpos, nil, true)
6087                
6088                SGroup_Clear(sg_calliope_target_pos)
6089                SGroup_Clear(sg_calliope_target_enemy)
6090                
6091                Util_AutoIntel(t_best_speech.t_obj_calliope_attacks)
6092                
6093                if v_calliope_target == 1 then
6094                    Rule_AddOneShot(Calliope_AI_TargetA, 60)
6095                elseif v_calliope_target == 2 then
6096                    Rule_AddOneShot(Calliope_AI_TargetB, 60)
6097                end
6098                Rule_RemoveMe()
6099            end
6100        end
6101    end