Nope. No errors. My head hurts though. ._.*
Haha, lemme look through the script one more time.
EDIT:
I think Space Guy is right and doesn't say that for fun.
Your weapon only changes image when the ammo != 0.
But i don't see that the ammo gets set on anything.
IF you use Space Guy's ammo script, you should try to do what Space Guy said.
Otherwise, set the ammo in the onmount script.
When a variable doesn't get set but is used, you get some highly unpredictable actions.
Tl;dr
The ammo clarification DOES matter since the iron sight action only executes when having ammo.
And when Space Guy says something, you can almost know he's right.
He has very much experience points in scripting. ;)
(However, even he doesn't know everything though. :P)