As the error message at line 88 states, you need to have computed the MNI transformation on your subject's MRI before being able to use the bst_project_grid() function.
You can do so by switching the Brainstorm database to Anatomy mode, expanding the affected subject, right clicking on its MRI object and selecting "Compute MNI transformation". See screenshot below: