hard time debugging an NSString concatenation
if([self checkIfInsideBoard_X:touchLocation.x checkIfInsideBoard_Y:touchLocation.y] == YES) {
//check if there are any highlighted cell in the board, if no sets it to yes to highlight a cell
//get source
if (isActiveCell == NO) {
isActiveCell = YES;
[self getCellFromCoordsX:touchLocation.x coordsY:touchLocation.y];
//save source to sMove string
moveString = [[[NSString stringWithFormat: @"%d", [self getRow:touchLocation.y]] stringByAppendingString:[NSString stringWithFormat: @"%d", [self getColumn:touchLocation.x]]] stringByAppendingString: sBoard[ [self getRow:touchLocation.y] ] [ [self getColumn:touchLocation.x] ] ];
NSLog(@"move string : %@", moveString);
// NSLog(@"filename: %@", [self getPieceFileName:@"A"]);
}
//get destination
else {
isActiveCell = NO;
moveString2 = [NSString stringWithFormat:@"%@_%@", moveString, @"i'm concatenating this string to moveString"];
}
}
i have this code above, and keep getting an error like this: Program received signal: “EXC_BAD_ACCESS”.
warning: Couldn't find minimal bounds for "_sigtramp" - backtraces may be unreliable
i get this error on this line of code: moveString2 = [NSString stringWithFormat:@"%@_%@", moveString, @"i'm concatenating this string to moveString"];
}
it's a simple concatenation of string but i really don't understand why i'm getting this error. can somebody please help me.. thnx in advance.. any help will be appreciated.
|