I am using pascal to do an assignment but keep running into this error '";" expected but Else found'. I have seen many questions asking this and tried to use them to help myself but no luck.
My code
Program TeamWrite;  
    Var FName, txt : String[10];  
    UserFile : Text;  
BEGIN          
    FName := 'Team';  
    Assign(UserFile, 'C:\Team.dat');  
    Rewrite(UserFile);  
    Writeln('Enter players name and score separated by a space, type end to finish');  
    if txt = 'end' then;  
        BEGIN  
            Close(UserFile)  
        End;  
    Else  
        BEGIN  
            Readln(txt);  
            Writeln;  
            Writeln(UserFile,txt);  
        End;  
    Until(txt = 'end');  
End.  
				
                        
I'm not familiar with Pascal, but having a quick look through some websites I think you don't need the ; after the first if statement:
should probably be