Hi there, Why am I getting this error? It states that, "error CS1501: No overload for method `InvokeRepeating' takes `1' arguments" Here is my code. Code (csharp): InvokeRepeating("tapForFire"); Here is the full code. I am not sure it has anything to do with the fact it is Update(with breakers). Code (csharp): ///for Web and Desktop use, keyboad must act as second control. (tap, left side of screen). void Update() { if (Input.GetKeyDown(KeyCode.X)){ if(!gunFireEnabled){ gunFireEnabled = true; InvokeRepeating("tapForFire"); return; } } }
Because no overload of InvokeRepeating takes 1 argument. Exactly what the error says.... http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.InvokeRepeating.html
InvokeRepeating in Update is also a really bad idea as it will start a new invocation every frame that condition is true.