Right now, my project is br0ke. It's giving me a bunch of errors, including an "unexpected end of file". I cannot see where the error lies.
Before this happened, I recorded a video to show my recent progress.View videoThis menu is set up like this.// Main Menu
menuSystem->AddButton("Play", centerX - 100, 300, 200, 35, MENU_MAIN, [=]()
{
GameEngine::ChangeState(new IntroState(), true);
});
menuSystem->AddButton("Settings", centerX - 100, 336, 200, 35, MENU_MAIN, [=]()
{
menuSystem->GoTo(MENU_SETTINGS);
});
menuSystem->AddButton("Quit", centerX - 100, 372, 200, 35, MENU_MAIN, [=]()
{
GameEngine::StopGame();
});
// Settings
menuSystem->AddBox("Settings", centerX - 150, 250, 300, 250, MENU_SETTINGS);
menuSystem->AddButton("Back", centerX - 75, 515, 150, 35, MENU_SETTINGS, [=]()
{
menuSystem->GoTo(MENU_MAIN);
});
+1 for the music and the waving hamster. No clue on the EOF error though :<
An unexpected end of file means you forgot either a > or a } at the end of a function or template. It can sometimes also be caused by a missing semicolon on the end of a class if that class is the absolute last thing in the file. Theoretically a missing ) could also trigger it, but this is unusual. Since this usually causes a cascade of other errors, you should try to use those to pinpoint the issue.
I fixed my error. I think it was caused by the fact that I had two headers that were including each other. Do you know if this would lead to problems, blackhole? It was definitely a problem with how I was #including files anyway.
That should only cause a problem if you aren't using include guards. You are using include guards, right?
I use #pragma once in all my headers, but it is still possible for two headers to include each other, which creates an endless loop and thus an error, I believe.
#pragma once should prevent that endless loop…
And if it doesn't,