function error!

hi, would help to resolve this error. thanks!

Having said that - what's l?
And you realise that this will return true if 'val' has a prefix of 'data' - it doesn't have to be completely equal?