Skip to content

Commit

Permalink
Fix Debug Statements throwing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
UndeadZeratul committed Jun 24, 2023
1 parent c8db06b commit 1c214f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zscript/universalreloader/items/universalReloader.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class HDUniversalReloader : HDWeapon
}
}

if (hd_debug) console.printf("Can assemble "..recipe.AmmoClass.GetClassName().."? "..canCraft);
if (hd_debug) console.printf("Can assemble "..(recipe ? recipe.AmmoClass.GetClassName() : 'nothing').."? "..canCraft);

return canCraft;
}
Expand All @@ -147,7 +147,7 @@ class HDUniversalReloader : HDWeapon
{
let canCraft = owner && recipe && owner.countInv(recipe.AmmoClass) > 0;

if (hd_debug) console.printf("Can disassemble "..recipe.AmmoClass.GetClassName().."? "..canCraft);
if (hd_debug) console.printf("Can disassemble "..(recipe ? recipe.AmmoClass.GetClassName() : 'nothing').."? "..canCraft);

return canCraft;
}
Expand Down

0 comments on commit 1c214f1

Please sign in to comment.