hi i m a beginner.... i ve declare a globle var row and i m trying to use it in start function but it gives error "BCE0005: Unknown identifier: 'rows'." script is :
var rows:int=4;
function start()
{
playerCanClick = true;
aCards = new Array();
aGrid = new Array();
aCardsFlipped = new ArrayList();
for(i=0; i<rows; i++)
{
aGrid*=new Array();*
*for(j=0;j<4;j++)*
*{*
_aGrid*[j] = new Card();*_
_*}*_
_*}*_
_*}*_
_*```*_
I tried to compile your code since it couldn't be rows that was unidentified (it's clearly defined in the scope of the class), and it appears there is another error but that is probably because I don't have the class Card - I assume you do.
BCE0005: Unknown identifier: 'Card'.
If I changed the code to set it to `null` instead of `new Card();`, there is no compile error. There is no such error in your script as
BCE0005: Unknown identifier: 'rows'.
So, why are you getting this error? Maybe you forgot to save the file since you added the variable. Or Unity didn't detect the change. Re-save the file and try again. If problem persists, restart Unity. If you have OTHER errors in your code base then fix them first.