hi. could someone take a look at this code and set me on the right track. i should imagine this stuff is playschool for you guys so any help is very appreciated.
var i : Char;
begin
with Questions[1] do
begin
i := 'F';
if i = 'B' then
begin
Correct := Correct + 1;
end
else
begin
Wrong := Wrong + 1;
end;
end;
with Questions[2] do
begin
i := 'F';
if i = 'D' then
begin
Correct := Correct + 1;
end
else
begin
Wrong := Wrong + 1;
end;
end;
im am trying to increase a score board every time someone answers a question correctly or incorrectly. all this code does is increase the incorrect score by 10( there are ten questions) even if the correct answer is clicked. there are five buttons labeled A-E. the buttons are represented by i. sorry if this seems really simple or if you need more of my code to understand what im on about ) just tell me.
var i : Char;
begin
with Questions[1] do
begin
i := 'F';
if i = 'B' then
begin
Correct := Correct + 1;
end
else
begin
Wrong := Wrong + 1;
end;
end;
with Questions[2] do
begin
i := 'F';
if i = 'D' then
begin
Correct := Correct + 1;
end
else
begin
Wrong := Wrong + 1;
end;
end;
im am trying to increase a score board every time someone answers a question correctly or incorrectly. all this code does is increase the incorrect score by 10( there are ten questions) even if the correct answer is clicked. there are five buttons labeled A-E. the buttons are represented by i. sorry if this seems really simple or if you need more of my code to understand what im on about ) just tell me.