So I’ve been able to work everything out thus far, but I get this error quite often and want to see if there’s some kind of foundational knowledge I’m missing that keeps this error popping up.
It doesn’t seem like I should be able to mess it up between finishing a line and starting a new one. It happens directly after I add the ‘if’ statement, and will not go away. I’ve been able to erase and start again but this one won’t go away.
#include "raylib.h"
int main()
{
//Window Dimensions
const int FrameHeight {380};
const int FrameWidth {512};
//Initialize Window
InitWindow( FrameWidth, FrameHeight, "Dapper Dasher!");
// Rectangle Dimensions
const int width {50};
const int height {80};
int PosY {FrameHeight - height};
int velocity {0};
SetTargetFPS(60);
while (!WindowShouldClose())
{
//Start Drawing
BeginDrawing();
ClearBackground(WHITE);
if (IsKeyPressed(KEY_SPACE));
{
velocity -= 10;
}
PosY += velocity;
DrawRectangle(FrameWidth/2, PosY, width, height, RED);
//Stop Drawing
EndDrawing();
}
CloseWindow();
}