C# Script unexpected 'int' error

Hey everyone, i recently have had an unexpexted error.
I’m using C# and need help on this script, why is this ‘int’ unexpected.

public class Deck : MonoBehaviour
{
Listcards;

public void Shuffle()
{

if (cards == null)
{
cards = new List();
}
else
{
cards.Clear();
}
for(int i = 0; i<52; i++)
cards.Add(i)

int n = cards.Count;

while (n > 1)
{
n–;
int k = Random.Range(0, n + 1);
int temp = cards[k];
cards[k] = cards[n];
cards[n] = temp;
}

}
}

Unity doesn’t want this markered int, it always says error, doesn’t matter what i try.
(Just saying, im a C# starter, and i made this with a youtube tutorial)

You forgot a semicolon.
cards.Add(i);

unexpected xxx does normally means that the compiler is awaiting something different in hat place. in this case the compiler awaits the semicolon but finds your int.

thank you very much :smile: