- Home /
C# No overload for method 'BeOlvasBabok' takes 1 arguments
Hello,
It's a project in my school, I try to get a few dummy's position, and the direction, where they are going. I have to use methods, so I try to implement it in this way. I got the error here:
babok = BeOlvasBabok("tabla.be,b");
where tabla.be is the name of the file, and b is a short number, and babok is a byte[,].
And it's definition is:
static byte[,] BeOlvasBabok(string filenev, short babszam)
{
byte[,] babok;
babok = new byte[3, babszam];
//first line reread, to start at the second line
StreamReader sr = new StreamReader("tabla.be");
string a = sr.ReadLine();
for (int i = 0; i != babszam; i++)
{
a = sr.ReadLine();
string[] c = a.Split(' ');
babok[0, i] = byte.Parse(c[0]);
babok[1, i] = byte.Parse(c[1]);
// converting the directions to numbers: down(l):1, up(f):2, right(j):3, left(b):4
switch (c[2])
{
case "l":
case "L":
babok[2, i] = 1;
break;
case "f":
case "F":
babok[2, i] = 2;
break;
case "j":
case "J":
babok[2, i] = 3;
break;
case "b":
case "B":
babok[2, i] = 4;
break;
default:
Console.WriteLine("Hiba a " + i + "-edik bevitt adatban!");
break;
}
sr.Close();
}
return babok;
}
I found a few similiar problems here, but unfortunately can't figure out, have to use them in my solution.
Answer by Durayel · Nov 24, 2013 at 03:55 PM
It just looks like your end quote is in the wrong place and should probably be: babok = BeOlvasBabok("tabla.be", b);
Your answer
Follow this Question
Related Questions
No overload for method 'ClampMagnitude' takes '3' arguments 2 Answers
[Solved]List.FindIndex error C# 1 Answer
No overload for method 'GetMethod' takes 5 argument 0 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers