Search code examples
c#identifier

There is an identifier expected but i don't know what i need to put there


What kind of identifier does the visual studio needs ? i just want to put from outside one int array with 2 different numbers between 0 and 66.

    public static void playerLocationChange(int[])
    {

    }

Solution

  • You have to give the parameter a name. Otherwise, you have no way of referring to it from the function.

    public static void playerLocationChange(int[] myIntArrayParam) 
                                            //Notice the name next to int[]
                                            //This is the parameter's name
    {
    
    }