i am doing this:
Code:
- (IBAction)showCheat
{
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"Warning!"
message: @"Are You Sure you Want to See the Answer? Beware it Takes 3 Points Away From your Grade"
delegate: self
cancelButtonTitle: @"Cancel"
otherButtonTitles: @"OK"];
[alert show];
[alert release];
}
- (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
// the user clicked one of the OK/Cancel buttons
if (buttonIndex == 0)
{
NSLog(@"Ok");
UIAlertView *alerttwo = [[UIAlertView alloc] initWithTitle: @"Warning!"
message: solutionText
delegate: self
cancelButtonTitle: @"Cancel"
otherButtonTitles: @"OK"];
[alerttwo show];
[alerttwo release];
}
else
{
NSLog(@"Cancel");
}
}
}
but get the following errors on the red line:
Wrong type argument to unary minus
expected ';' before ':' token
thanks for any suggestions