Syntax error near unexpected token `}' please help

I'm going mad not being able to get this to work. im assuming its only a simple mistake but its driving me bonkers trying to find it.

Please if you can help me it would save me pulling my hair out!!

Thanks

#!/bin/bash -xv
#
#Config
name="TEST Server"
+ name='TEST Server'
path="/home/call4it/murmur"
+ path=/home/call4it/murmur
user="call4it"
+ user=call4it
server="murmur.x86"
+ server=murmur.x86
pid="$path/mumble"
+ pid=/home/call4it/murmur/mumble

# Startup Mumble Server
	
service_start() {

    # Check if the pid files currently exist
    if [ -f $pid ]; t$
        # Pid files allready exist check if the process is still running.
        if [ "$(ps -fp `cat $pid` | wc -l)" -gt 1 ]; then
            # Process is still running.
            echo -e "Cannot start $name.  Server is already running."
        #exit 1
        else
	# Process exited with out cleaning up pid files.
            if [ "$(ps -fp `cat $pid` | wc -l)" -gt 1 ]; then
            # Screen is still running.
            # Get the process ID from the pid file we created earlier
                for id in `cat $pid`
                do kill -9 $id
                echo "Killing process ID $id"
                echo "Removing $name  pid file"
                rm -rf $pid
                break
                done
            fi
	# Remove server pid file
        echo "Removing $name pid file"
        rm -rf $pid

 # Server is not running start the server.
        if [ -x $server ] ; then
            echo "Starting $name - $user"
            cd $path
            $server
            # Prevent race condition on SMP kernels
            sleep 1
            echo "$name started."
            # Was having problems with directory permisions due to FTP access m$
            chmod 666 $pid 1> /dev/null 2> /dev/null
            # Make any pid files created by different users owned by the set us$
            chown $user $pid 1> /dev/null 2> /dev/null
            sleep 2
      	fi
}
./mumstart: line 52: syntax error near unexpected token `}'
./mumstart: line 52: `}'

delete the lines below:

+ name='TEST Server'
+ path=/home/call4it/murmur
+ user=call4it
+ server=murmur.x86
+ pid=/home/call4it/murmur/mumble

they are the output from the script being run in -xv

Any one else able to comment?

there are missing two "fi" close statemenets
fi
fi

then statement is missing in the first if statement..

 ...
service_start() {
 
    # Check if the pid files currently exist
    if [ -f $pid ]; t$
..

Check the closing if statements fi. They seems to be missed for below if's

 
if [ -f $pid ]; t$
        # Pid files allready exist check if the process is still running.
        if [ "$(ps -fp `cat $pid` | wc -l)" -gt 1 ]; then
            # Process is still running.
 

check this one

#!/bin/bash
#
#Config

name="TEST Server"
path="/home/call4it/murmur"
user="call4it"
server="murmur.x86"
pid="$path/mumble"

# Startup Mumble Server

service_start() {

    # Check if the pid files currently exist
    if [ -f $pid ]; then
        # Pid files allready exist check if the process is still running.
        if [ "$(ps -fp `cat $pid` | wc -l)" -gt 1 ]; then
            # Process is still running.
            echo -e "Cannot start $name.  Server is already running."
        #exit 1
        else
        # Process exited with out cleaning up pid files.
            if [ "$(ps -fp `cat $pid` | wc -l)" -gt 1 ]; then
            # Screen is still running.
            # Get the process ID from the pid file we created earlier
                for id in `cat $pid`
                do kill -9 $id
                echo "Killing process ID $id"
                echo "Removing $name  pid file"
                rm -rf $pid
                break
                done
            fi
        # Remove server pid file
        echo "Removing $name pid file"
        rm -rf $pid

 # Server is not running start the server.
        if [ -x $server ] ; then
            echo "Starting $name - $user"
            cd $path
            $server
            # Prevent race condition on SMP kernels
            sleep 1
            echo "$name started."
            # Was having problems with directory permisions due to FTP access m$
            chmod 666 $pid 1> /dev/null 2> /dev/null
            # Make any pid files created by different users owned by the set us$
            chown $user $pid 1> /dev/null 2> /dev/null
            sleep 2
        fi
fi
fi
}

cool thank you. Thats sorted the error.

Now i just have to work out why its not starting the server lol

Cheers guys and gals