Error: Wrong type argument to unary minus


#1

Am running this app on the iPhone Simulator now, and when I run it, I get the same error on the following two methods. The errors are
[ul]
– Wrong type argument to unary minus 2
– Expected ‘;’ before ‘:’ token
[/ul]:

- (void)mapView:(MKMapView *)mv didUpdateUserLocation:(MKUserLocation *)userLocation 
    {
        MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance([userLocation coordinate], 250, 250);
        [mv setRegion:region animated:YES];
    }
    if(TARGET_IPHONE_SIMULATOR){
        [newLocation initWithLatitude:37.33168900 longitude:-122.03073100];
    }
    
     [mapView setShowsUserLocation:YES];
    - (void)mapView:(MKMapView *)mv didAddAnnotationViews:(NSArray *)views
    {
        MKAnnotationView *annotationView = [views objectAtIndex:0];
        id ,MKAnnotation> mp = [annotationView annotation];
        MKCoordinateRegion region =
        
        MKCoordinateRegionMakeWithDistance([mp coordinate], 250, 250); [mv setRegion:region animated:YES];
    }



#2

This code is not defined in a method and thus is invalid:

    if(TARGET_IPHONE_SIMULATOR){
        [newLocation initWithLatitude:37.33168900 longitude:-122.03073100];
    }
    
     [mapView setShowsUserLocation:YES];

Also, the following two lines have two issues:

id ,MKAnnotation> mp = [annotationView annotation];
        MKCoordinateRegion region =

The , should be a < and the region isn’t set to equal anything.