#Weird issues when reloading weapon

1 messages · Page 1 of 1 (latest)

slim cliff
#

In what cases does this happen? When you have more spare ammo or less spare ammo? Also this may not matter too much but is there a reason you have both your statements as independent if statements instead of a if-else? I would imagine in most cases youd probably only want to do one condition or the other and never potentially both

The way I understand your code now, for example if spareAmmo = 30, and requiredAmmo = 20 then the first if makes spareAmmo = 10, and then the second if 10 < 20 is now true as well, so now spareAmmo = 0, which may not be the intended logic your wanting?

subtle mantle
#

no reason to do that actually i've just done that without thinking much being a bit tired

#

didn't even think about this possibility but yeah that would most likely be it