1
General / Rotating -1 to bigger number
« on: May 25, 2011, 12:54:47 pm »Quote from: "Disch"
Code: [Select]if (Event.Key.Code == sf::Key::Z){
// TileSelect--;
TileSelect += 7 - 1;
TileSelect = TileSelect % 7;
}
Thanks, I totally forgot about that. Your code was off by one though, I don't know why you added -1. I used const int MAX_TILE which contained 7 and now it works as intended.