Skip to content

Commit

Permalink
Added fallback to self.UnitId in error message (#6640)
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Balthazar authored Feb 3, 2025
1 parent 326ba14 commit d03760a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/sim/Unit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4020,7 +4020,7 @@ Unit = ClassUnit(moho.unit_methods, IntelComponent, VeterancyComponent, DebugUni
if self:IsValidBone(bone) then
return true
end
error('*ERROR: Trying to use the bone, ' .. bone .. ' on unit ' .. self.UnitId .. ' and it does not exist in the model.', 2)
error('*ERROR: Trying to use the bone, ' .. bone .. ' on unit ' .. (self.UnitId or self:GetUnitId()) .. ' and it does not exist in the model.', 2)

return false
end,
Expand Down

0 comments on commit d03760a

Please sign in to comment.