The translation of this sentence 'If you know both sides, you will win a hundred times in one hundred battles. (知己知彼 百戰百勝)' is incorrect. The word '殆' in Chinese means 'danger'. '百' in this sentence is better interpreted as 'numerous' rather than 'hundred'.
Furthermore, knowing both sides doesn't guarantee winning. '知己知彼 百戰百勝' ('If you know both sides, you will win a hundred times in one hundred battles') is untrue since in the beginning paragraph of chapter four, Master Sun wrote 'Hence, we can well predict who would win but there is no strategy guaranteeing winning (故曰: 勝可知,而不可為。)'. The reason for the uncertainty is chance or luck.