Default OnFire() function doesnt work after modifying it

Im just starting out with unreal engine and i wanted to know how to code in an ammo feature for the gun so i looked up tutorials but none of them work on 4.18.2.

All i have is a default first person c++ with no starter content and if you modify the OnFire function, it just stops working, even if you set everything back to default.

Can anyone explain why this doesnt work?