- Home /
Question by
Wacken · Dec 11, 2017 at 10:35 AM ·
c#build-errorargumentsoverload
No overload for method 'GetMethod' takes 5 argument
Ok, my problem is in the title. When i want to build my project, i suddenly get this error: Assets\interactableFileMenu.cs(231,27): error CS1501: No overload for method 'GetMethod' takes 5 argument It works fine in the editor and there also should be a Method for 5 arguments, why tho do i Get an error
for (int i = 0; i < p; i++)
{
Type thisType = typeof(InteractableObject);
MethodInfo theMethod = thisType.GetMethod("registerSkill_" + (i + 1), BindingFlags.Instance | BindingFlags.NonPublic, null, new[] { typeof(string) }, null);
object[] parameters = new[] { Savings[(page * 4) + i] };
theMethod.Invoke(this, parameters);
}
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
C# No overload for method 'BeOlvasBabok' takes 1 arguments 1 Answer
Distribute terrain in zones 3 Answers
No overload for method "Destroy" takes 2 arguments? -1 Answers
Android Gradle Build Error 5 Answers