So I’ve pinpointed an issue I was having some time ago involving this error. Any time a macro has a $continue at the end, the compilation fails with the error “Macro expand overflow”
Here is an example from the Prone Mod github from gmod:
$definemacro MakeAimLayer layername filename \\
$animation a_$layername$_neutral $filename$ frame 4 4 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_down_left $filename$ frame 0 0 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_down_center $filename$ frame 1 1 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_down_right $filename$ frame 2 2 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_mid_left $filename$ frame 3 3 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_mid_center $filename$ frame 4 4 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_mid_right $filename$ frame 5 5 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_up_left $filename$ frame 6 6 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_up_center $filename$ frame 7 7 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$animation a_$layername$_up_right $filename$ frame 8 8 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
// $animation a_$layername$_straight_up $filename$ frame 7 7 subtract a_$layername$_neutral 0 weightlist AimLayerWL ikrule lhand touch "ValveBiped.Bip01_R_Hand" usesource \\
$sequence $layername$ { \\
// a_$layername$_straight_up a_$layername$_straight_up a_$layername$_straight_up \\
a_$layername$_up_right a_$layername$_up_center a_$layername$_up_left \\
a_$layername$_mid_right a_$layername$_mid_center a_$layername$_mid_left \\
a_$layername$_down_right a_$layername$_down_center a_$layername$_down_left \\
blendref a_$layername$_neutral \\
blendcenter a_$layername$_mid_center \\
blendwidth 3 calcblend aim_yaw "anim_attachment_RH" ZR calcblend aim_pitch "anim_attachment_RH" YR \\
delta \\
iklock rfoot 1 0 iklock lfoot 1 0 \\
hidden \\
} \\
$continue $layername$
Compiling without the $continue works but leads to negative effects like rotating the player model by 90 degrees during all animations.
Here are the settings being used on the latest version of Crowbar:
"E:\Program Files\Steam\steamapps\common\GarrysMod\bin\studiomdl.exe" -game "E:\Program Files\Steam\steamapps\common\GarrysMod\garrysmod" -nop4 -verbose "player_male_anims_m_anm.qc"
Any help would be appreciated