Unreal Failed Math Class. 36 - 1 = 0

Just trying to debug this honestly ridiculous bug. My reserve ammo was returning a 0 somewhere, and I pinpointed it to the subtract node at the bottom of the photo. Literally, 36-1 = 0. It does this in all the other ammo types as well. Medium ammo was 100-8 = 0.

The Current Ammo definitely has values, as the branch about checks if it is greater than 0, and it’s true. I also removed the clamp just to see and it still returns a zero.

Current Shotgun is the reserve ammo stored in my player and transferred over via an interface and set in a local variable.


1 Like