Fix typo, : > .
minetest.env:function should be minetest.function instead of minetest:function