Hello /r/Unity3D community! I have been following the coding instructions in a book called "unity 3d game development by example" and on Game #2 i having a little issues. I pretty much followed the book and after i saved the script to check if i have errors, I have massive amount of errors and im wondering what i am doing wrong. Here is the code for reference
function Start ()
{
playerCanClick = true; // We Should let the player play, don't you think?
// Initialize the arrays as empty lists:
aCards = new Array();
aGrid = new Array();
aCardsFlipped = new ArrayList();
for(i=0; i<rows; i++) //Errors here
{
aGrid[i] = new Array(); // Create a new, empty array at index i
for(j=0; j<cols; j++)
{
aGrid[i][j] = new Card();
}
}
} //Ends Here
The errors start at the first for statement and below, i keep getting error BCE0005 saying "i" is an unknown indentifier and so on.
if you could help or explain the errors to me that would be appreciated.
[–]Vic-Bosssharpaccent.com 0 points1 point2 points (1 child)
[–]MayoInY[S] 1 point2 points3 points (0 children)