I have been trying to print a 2d array onto the brain screen an every time I play my code, a “memory permission error 038013C8” pops up. I don’t know what the problem is so please help, cause I might be doing something entirely wrong.
The code:
int b = Sensor.distance(inches);
int Bob[2][2]={{1, 2}, {3, 4}};
int main() {
// Initializing Robot Configuration. DO NOT REMOVE!
vexcodeInit();
while (x<4)//makes the first array
{
Brain.Screen.print(Bob[0][0]);
Brain.Screen.print(Bob[0][1]);
Brain.Screen.newLine();
Brain.Screen.print(Bob[1][0]);
Brain.Screen.print(Bob[1][1]);
x=4;//how many times it prints the array
}
wait (5, seconds);
Brain.Screen.clearScreen();
}