Yes your helo className is incorrect. For the MH-9 it should be "B_MH9_F
". I didn't find a list available on the net but you can easily check classnames yourself using this method:
1. Place a vehicle into the map in the editor
2. Into the initialization field of this vehicle write:
hint format ["%1",typeOf this];
3. Click on "Preview" and you will see the correct className at the hint area. Use it for one vehicle at a time.
Now coming back to your code, there are a few other things I should point out:
1. Your hint "Spawning MH-9?"
line is missing ;
at the end
2. Make sure the marker name you are getting for markerPos
here: _spawnPos = markerPos (_this select 0);
is valid (defined and string format).
3. Your heco
variable should be defined as local as well (_heco = createVehicle ...
instead of heco = createVehicle ...
4. In your createVehicle
you are selecting the first element of the position array. This is not correct, the function needs the whole position array (x,y,z). It should be: _spawnPos
instead of _spawnPos select 0
5. You are currently spawing the helo as "FLY"
mode. However your helo hoes not have a pilot in it to keep it flying (it will just crash). Perhaps you should spawn it as "NONE"
until you figure out how to put a pilot in there and make it follow waypoints :)
So covering all that I would suggest starting simple with the following:
hint "Spawning MH-9?";
_spawnPos = markerPos "nameOfMyMarker"; // Get our spawn marker (manually typing the name)
_heco = createVehicle ["B_MH9_F", _spawnPos, , 0, "NONE"]; // Spawn MH-9
..and then start changin it once this part works and a helo is actually spawned :)