324 {
327
328 string secondPart =
" - ENTITY IN HANDS IS NOT A WEAPON: " +
Object.GetDebugName(GetEntityInHands());
329
330 string firstPart =
"[wpnfsm] " +
Object.GetDebugName(GetInventoryOwner()) +
" failed to perform weaponevent " +
m_DeferredWeaponEvent.DumpToString();
331 if (weapon)
332 {
333 secondPart =
" on " +
Object.GetDebugName(GetEntityInHands()) +
" which is in state " + weapon.GetCurrentState();
334 secondPart += " with physical state: J: " + weapon.IsJammed() + " | ";
335 for (int i = 0; i < weapon.GetMuzzleCount(); ++i)
336 {
337 secondPart += "Chamber_" + i + ": B(" + weapon.IsChamberFull(i) + ") F(" + weapon.IsChamberFiredOut(i) + ") E(" + weapon.IsChamberEmpty(i) + ") | ";
338 secondPart += "Magazine_" + i + ": " + weapon.GetMagazine(i);
339 if (i < weapon.GetMuzzleCount() - 1)
340 secondPart += " | ";
341 }
342 }
343
344 Error(firstPart + secondPart);
346 }
ref WeaponEventBase m_DeferredWeaponEvent
deferred hand event
Super root of all classes in Enforce script.
void Error(string err)
Messagebox with error message.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.