关于#ui#的问题,如何解决?

出现这个错误是怎么回事,铁汁们请告知。

Build target 'Target 1'
compiling s.c...
s.c(56): error C141: syntax error near 'void'

#include 
#include "Delay.h"
#include "LCD1602.h"
#include "MatrixKey.h"
unsigned char KeyNum,Times=0,Time=30;
unsigned int Password,Count;
unsigned char MatrixKey();

void main()
{

    LCD_Init();
    LCD_ShowString(1,1,"Password:");
    
    

    while(1)
    {
        KeyNum=MatrixKey();
        if(KeyNum)
        {
            if(KeyNum<=10)
                if(Count<4)
                {
                    Password*=10;
                    Password+=KeyNum%10;
                }
                Count++;
                LCD_ShowNum(2,1,Password,4);
        }
    }        
    if(KeyNum==11)
    {
        if(Password==6260)
        {
            LCD_ShowString(1,14,"OK ");
            Password=0;
            Count=0;
            LCD_ShowNum(2,1,Password,4);
        }
        else
        {
        
            LCD_ShowString(1,14,"ERR");
            Password=0;
            Count=0;
            LCD_ShowNum(2,1,Password,4);
            Times++;
            
            if(Times>=3)
                {
                    Times=0;
                }
        }
        
        void Timer0_Rountine() interrupt 1

                {
                    static unsigned int T0Count;
    
                    TL0 = 0x66;        //ÉèÖö¨Ê±³õʼֵ
                    TH0 = 0xFC;        //ÉèÖö¨Ê±³õʼֵ
                    Time--;
                    if(T0Count>=1000)
                        {
                        T0Count=0;
                        }
                    if(Time==0)
                    {
                    Times=0;
                    }
                }
            
        }
        
        if(KeyNum==12)
        {
        Password=0;
        Count=0;
        LCD_ShowNum(2,1,Password,4);
        }

}

你自己看,大括号{}不匹配
void Timer0_Rountine() interrupt 1

            {
                static unsigned int T0Count;

                TL0 = 0x66;        //ÉèÖö¨Ê±³õʼֵ
                TH0 = 0xFC;        //ÉèÖö¨Ê±³õʼֵ
                Time--;
                if(T0Count>=1000)
                    {
                    T0Count=0;
                    }
                if(Time==0)
                {
                Times=0;
                }

移到外面,它和main()是平级的