You need proper loop variable and proper indexing of array in loop, also you need
begin..end block when there are more commands in loop or in
if..then..else:
var i: Integer;
...
for i:=1 to 4 do begin //begin of loop with more commands
...
candidate[i]; //proper index
...
end; //end of loop
...
if candidate[i]>hdboyvotes then
hdboy:=candidate[i]; //no end needed here
Pascal has no
endif.