a function-definition is not allowed here before '{' token

An Arduino sketch has two required functions, setup() and loop(). Even if these functions are empty, they are required (e.g. the bare minimum example)

thanks you all who help me out solving this problem
i have all done with help provided by all the community members

Now the question is if it works :smiley:

Just having the functions mtr1 etc and not calling (using) them will not help.

yes it works well
but a problem is produced
i am using this code in proteus designed circuit and when i made the input of any sensor high the motor stop working and lcd shows that motor is off but when i made the sensor value low it will not turn on the motor

We can see neither your code, nor your schematic.