Execute if, in mcfunction files

So i cannot get any /execute if .... commands to work when inside of an mcfunction file. I am wanting to detect when a block at coordinates 0, 62, 0 in the end has a certain nbt value. The command works fine in minecraft, and inside of command blocks. but it just stops working completely when in an mcfunction file. Does anyone know why this is, and how i could get around this?

Continue to help post