CompuServe Messages

#GURU.error

    21-Sep-90 16:07:27
Sb: #GURU.error
Fm: Henry Williams 73527,1446
To: all
To Mike, Don, or anyone else who can find the mystery of the GURU 00000003. address error I keep getting in my program. Here's an abridged version of my program. All parts left out have nothing to do with the array a. static int a[31][62] = { /* global array */ 91,93,91,93,91,93,91,93,91,93,91,93,91,93,91,93,91,93,91,93,etc., I've initialized exactly 1,922 elements filling all of array a. }; main () { title (); } direction (rw,cl,warn) /* FUNCTION TAKES DIRECTION FROM KEYBOARD */ int rw, cl,warn; { char inp[80]; int sig = 0; if (warn == 1) { maze(rw,cl,warn); } printf (">"); scanf ("%s",&inp); switch (inp[0]) { case 'n': rw = rw – 1; if (inp[1] == 'e') { cl = cl + 2; } if (inp[1] == 'w') { cl = cl – 2; } break; case 's': rw = rw + 1; if (inp[1] == 'e') { cl = cl + 2; } if (inp[1] == 'w') { cl = cl – 2; } break; case 'e': cl = cl + 2; break; case 'w': cl = cl – 2; break; default: wrong(rw,cl,sig); break; } maze (rw,cl); } maze (rw,cl,) /* DRAW MAZE FUNCTION */ int rw, cl,; { int r, c; if (rw < 0) {rw = 0;} if (cl < 0) {cl = 0;} if (rw > 24) {rw = 24;} if (cl > 48) {cl = 48;} for ( r = rw; r <= rw +6; ++r) { for ( c = cl; c <= cl +13; ++c) { printf ("%c",a[r][c]); } printf ("\n"); } direction (rw,cl); } title () /* LEADING FUNCTION */ { int ans = 0, sig = 1, warn = 1; int rw = 12, cl = 24; printf ("\n\n\n TITLE \n\n"); printf (" 1) A choice\n"); printf (" 2) Start game\n"); printf (">"); scanf ("%d", &ans); if (ans == 1) other function (); else if (ans == 2) { direction (rw,cl,warn);} else wrong (rw,cl,sig); } wrong (rw,cl,sig) I hope this is enough for you to get an idea whats wrong. Thanks Henry