ViewController.Type does not have a member named 'name'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ViewController.Type does not have a member named 'name'

SERGIO 9999
Inside my ViewController I'm creating a new Object that takes in a 2 dimensional array as a parameter. The array is declared above the instantiation of the Object. But I get an error on the line the Object is instantiated in that says "ViewController.Type does not have a member named '(name of the array)'". Any help would be appreciated. Here is the piece of code:

var arrayForMaze:[[Piece!]] = [[Piece2(),Piece4(),Piece8(),Piece7(),Piece8(),Piece4(),Piece13(),Piece8()],

                                [Piece9(),Piece2(),Piece9(),Piece9(),Piece5(),Piece8(),Piece9(),Piece1()],

                                [Piece11(),Piece14(),Piece15(),Piece6(),Piece2(),Piece1(),Piece11(),Piece3()],

                                [Piece1(),Piece2(),Piece5(),Piece10(),Piece14(),Piece13(),Piece12(),Piece2()],

                                [Piece7(),Piece14(),Piece13(),Piece3(),Piece2(),Piece1(),Piece11(),Piece12()],

                                [Piece1(),Piece2(),Piece9(),Piece4(),Piece15(),Piece10(),Piece12(),Piece1()],

                                [Piece4(),Piece15(),Piece14(),Piece10(),Piece6(),Piece2(),Piece5(),Piece8()],

                                [Piece4(),Piece14(),Piece3(),Piece4(),Piece10(),Piece14(),Piece10(),Piece6()]]

    

    let maze1:Maze! = Maze(myArray: arrayForMaze, startR: 1, startC: 2, endR: 7, endC: 6)         //This is the line with the error

--
You received this message because you are subscribed to the Google Groups "Swift Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/swift-language/4b55e503-91dd-4d5f-9a8f-cdcb1c8cc498%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.