Compiling freezes

I have followed instructions in book but I am getting a freeze on my error message. Thanks for your help. Attachments below.

Why do you have two void setup() methods and two void loop() methods? They are both doing the same thing (with the exception of the second loop).

Maybe modify meant to change some things not necessarily do it again? I will try it another way. Thanks for your patience I am new to this.

Mine is not a compiling freeze but a compiling error. I thought it would be related; any way, given below is my code for a game. It doesn’t show which line has the error but complains compiling error. It would be helpful if you point out the error. Whenever I hit the upload button, the compiler would run for a few seconds in white lines, then in red lines and stops at this message :

exit status 1
Error compiling for board Arduino/Genuino Uno.

bool L=true;
unsigned int h=0;
unsigned int t=200;
unsigned int e=0;
unsigned int f=0;
unsigned int m[]={};
unsigned int n[]={};
String s;
void setup()
{
Serial.begin(9600);
pinMode(A0,OUTPUT);
}

void loop() 
{
for(unsigned int q=2;q<10;q++)
{
pinMode(q,OUTPUT);
}
unsigned int a[]={2,4,3,6,7,5,4,9,6,8,4,7,9,2,4,6,7,5,3,8,4,9,6,2,6,7,3,9,4,3,5,7,3,8,5,7,7,9,2,7,3,5,3,9,7,4,6,2,5,9};
unsigned int i=2;
unsigned int pi;
unsigned int ph;
while(pi==i)
{
i++;
}
pi=i;
ph=h;
if(L==true)
{
for(unsigned int k=h;k<i;k++) //display
{
unsigned int pe;
while(pe==e)
{
e++;
}
pe=e;
m[e]=a[k];
Serial.println(a[0]);
digitalWrite(a[k],HIGH);
delay(t);
digitalWrite(a[k],LOW);
delay(t);
}
digitalWrite(A0.HIGH);
for(unsigned int x=2;x<10;x++) //reader
{
pinMode(x,INPUT);
s = digitalRead(x);
unsigned int pf;
while(pf==f)
{
f++;
}
pf=f;
if(s==HIGH)
{
n[f]=x;
}
for(unsigned int p=0;p<sizeof(m[e])||sizeof(n[f]);p++)
{
unsigned int u=m[p];
unsigned int v=n[p];
if(u==v)
return true;
else return false;
}
}
}
if(L==false)
{
while(ph==h)
{
h++;
}
ph=h;
}
}

(Code tags added by moderator)

@Abhi7 why did you iron your code?

You mean(Ironing your code)?
I don't know how to shorten i.e. put that scroll bar in those messages.

This line
digitalWrite(A0.HIGH);

You have a period instead of a comma.

You need to go to your code in the IDE. Press Crt + A to select all code. Then press Crt + T to format it. If you still can't figure out the error. Then repost your code here in code tag so it appear like this

//your code

thanks… didn’t see that…and anything else

Done… thanks!

There are many uninitialized variables in your loop() and they are bad

unsigned int pf;
while(pf==f)
{
f++;
}
pf=f;

Holy Cremona. I am reminded of a quote:

On two occasions I have been asked, — “Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?” In one case a member of the Upper, and in the other a member of the Lower, House put this question. I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. ~ Charles Babbage

Abhi7, what on earth do you think that piece of code is supposed to do? The whole thing is so full of wrong and fail, here’s another example:

for(unsigned int p=0;p<sizeof(m[e])||sizeof(n[f]);p++)
{
unsigned int u=m[p];
unsigned int v=n[p];
if(u==v)
return true;
else return false;
}

Jesus. It’s like this person is desperately copying lines at random from other bits of code and tweaking them until they kinda look right and compile. I mean, you know those random poetry generators, that generate syntactically correct but meaningless poetry? This look like it was spat out by a program like that.

I don’t know who is teaching you to code or what approach they are trying to use, but it isn’t working. You don’t code by pulling together random stuff that you don’t understand and believing that the computer will somehow just know what you want. Programming isn’t voodoo, it’s building useful things out of parts. Would you just open up a car engine bay, throw random mechanical bits in there that you don’t know what they are, and expect the car to go?

To write a working program, you have to understand what you want the whole thing to do, what the various parts available to you do, and you have to get from one to the other. This involves a certain degree of imagination and analysis. I have seen other posts of yours, and your code is uniformly a confused mess. It all looks like someone throwing mud at the wall and hoping some will stick. At this stage, I’m less than completely certain that you have the faculties and propensities that people who actually can do this make use of when they do.