Hello again! I am trying to make a little game in pascal and I'm using graph. And it changes the background but when i'm trying to draw a black line it doesn't work. I don't know why.
uses graph;
var grDriver,grMode,ErrCode: Integer;
procedure initg;
begin grDriver := Detect;
InitGraph(grDriver, grMode,'e:/bp/bgi');
ErrCode := GraphResult;
if ErrCode <> grOk then
begin write('Graphics error:', GraphErrorMsg(ErrCode));
exit;
readln
end
end;
begin initg;
setbkcolor(7);
setcolor(black);
line(0,0,300,300);
readln;
closegraph
end.