I get the error variable i doesn’t exist and I’m not sure why. Without the if statement I don’t get errors. I’m pretty sure I’ve also seen the use of if statements and whatever int was in the for loop used in the if so I’m really confused.
int[] headx= new int[2500];
int[] heady= new int[2500];
int total= 2;
void move()
{
for(int i=total; i>total; i--);
{
if(i!=1)
{
headx[i]=headx[i-1];
heady[i]=heady[i-1];
}