Here's a snippet of my code which is causing issues:
void Find_Possible_Moves(int game_state[48]){
uint8_t r;
uint8_t col;
uint8_t k=0;
for(col=0;col<8;col++){
for(r=0;r<6;r++){
if(game_state[r*8+col] == 2){
//2=> no player owns that position
possible_moves[k]=r*8+col;
k++;
break;
}
}
}
In the debugger is comes up that the col values updates fine (and is stored in R21) but for r and k, the value is given as 'location not valid'. I'm just confused because initially I even had col and r declared on the same line and still col worked fine but r was given an invalid location.I'm just not really sure what's going on here. Any insight anyone? The function I posted is called by a different part of the code. Thanks :)
Edited by WingedPanther, 20 May 2009 - 07:42 AM.
add code tags (the # button)


Sign In
Create Account

Back to top









