* Disclaimer: I have never written a vessel with UMMU support, and have only just looked into its SDK this afternoon...
1. GetLastEnteredCrewName will only return the name of the crew member who was last to ingress - there is a high probability that your "ROBOT" was not the last to enter (unless you have done SetMaxSeatAvailableInShip(1), but it would be poor form to rely on it anyway).
2. GetCrewMiscIdByName returns a string (technically, an array of chars) from the - these are not the names of the crew members, so it would never return "ROBOT".
3. You use the "equal to" operator "==" to compare two char arrays which is not valid. The return value of GetCrewMiscIdByName will be a pointer equal to the memory location of an element in the UmmuMiscID arrayand "ROBOT" will return a pointer to that string (probably in static memory somewhere). These two things will never be equal. Use strcmp or similar instead.
4. Using a hard coded value for the mesh index is a bad idea. You really should use a vessel class member variable to cache the return value of AddMesh.
EDIT: Sorry, I got excited and hit the post button a bit quick... The solution is to call GetCrewMiscIdByName("ROBOT") and check that it returns a non-empty string using strlen:
Code:
if (strlen(GetCrewMiscIdByName("ROBOT")))
SetMeshVisibilityMode( 6, MESHVIS_ALWAYS );
else
SetMeshVisibilityMode( 6, MESHVIS_NEVER );