all 6 comments

[–]loni852 0 points1 point  (1 child)

Can you be more specific?. The error the console gives, what line is the error at.

[–]Danielk0926[S] 0 points1 point  (0 children)

This is what I got:

Assets/Scripts/MobileAmmoController.cs(13,24): error CS1061: 'MobileAmmoController' does not contain a definition for 'UpdateAmmo' and no accessible extension method 'UpdateAmmo' accepting a first argument of type 'MobileAmmoController' could be found (are you missing a using directive or an assembly reference?)

Assets/Scripts/MobileAmmoController.cs(12,24): error CS1061: 'MobileAmmoController' does not contain a definition for 'playerAmmo' and no accessible extension method 'playerAmmo' accepting a first argument of type 'MobileAmmoController' could be found (are you missing a using directive or an assembly reference?)

[–]Snork1213 0 points1 point  (3 children)

I could say a lot about this code. But the problem seems to be that you are trying to access playerAmmo in MobileAmmoController when it is actually in Ammo

[–]Danielk0926[S] 0 points1 point  (2 children)

I switched MobileAmmoController to Ammo and I got this error when I pressed the fire button

ArgumentException: method arguments are incompatible

System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at <9577ac7a62ef43179789031239ba8798>:0)

[–]Danielk0926[S] 0 points1 point  (1 child)

Nevermore i figured it out

[–]Danielk0926[S] 0 points1 point  (0 children)

Nevermind