Creating Function! Not working Properly

Im sorry i have posted in different forums but i posted in the incorrect forum before so i gathered i should post in this one now