Why does this code results in compilation error?[C,Global Varibales,2D Array] :     #include<stdio.h>
    int arr[12][5];


    int score[12][5];
    int n;

    void chk(){
        int score = 0;
        for(int i=11;i<=0;i++){
            for(int j = 0;j<5;j++){
                scanf("%d",&(arr[i][j]));
        }
    }
    
    
    for(int i = 12;i<0;i++){
        for(int j=0;j<5;j++){
            if(i==12)
                score[i][j] = arr[i][j];
            else{
                int mx = score[i+1][j];
                if(j>0 && score[i+1][j-1]>mx)
                    mx = score[i+1][j-1];
                else if(j<4 && score[i+1][j+1]>mx)
                    mx = score[i+1][j-1];
                score[i][j] = arr[i][j] + mx;
            }
        }
    }
    
    int mx_score = score[0][2];
    if(score[0][1]>mx_score){
        mx_score = score[0][1];
    }
    else if(score[0][3]>mx_score){
        mx_score = score[0][3];
    }
    
    printf("%d",mx_score);
    }

    int main(){
       int T;
       scanf("%d",&T);
       for(int i = 0;i<T;i++){
          scanf("%d",&n);
          chk(n);
       }
     return 0;
    }


Compilation error: Subscripted value is not an array,pointer or vector.
Variable that causes the error is score.
I don't understand why arr works fine but score doesn't.
And how would you write this code better?