Hey, I was working on a homebrew project (text-based game) and had a problem. When I run the program, it immediately runs through all the code and if statements to check if buttons are pressed, therefore outputting the first text then ending and crashing instantly. How would I wait for the A or B button to be pressed to continue?
Thanks for any help!
Code:
#include <3ds.h>
#include <stdio.h>
#include <iostream>
using namespace std;
int main (int argc, char **argv)
{
hidInit();
hidScanInput();
gfxInitDefault();
consoleInit(GFX_TOP, NULL);
u32 kDown = hidKeysDown();
cout << "Does this code work? \n";
cout << "Press A for yes and B for no. ";
//i need to pause and wait for an input here
if (kDown & KEY_A)
{
goto label2;
}
if (kDown & KEY_B)
{
goto labelinc;
}



there were a few problems, but I got them worked out. Mostly just typing things wrong lol



