There is another keyword that can be placed within the mission script:
This will give you more information if exceptions occure. I think the main purpose of the //$reference keyword is to allow the creation of a own base class for your mission. Without the reference the .dll that contains the base class is not loaded.