It looks like the parameter is named actionSheet not alertView. I guess you can change that easily.
...
- (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if ((alertView.tag == 1)) {
if (buttonIndex == 0)
{
...