Past Perfect + before/when
Incorrect : I had reached the school till the rain started.
Correct : I had reached the school before/when the rain started.
Note: The adverbial clause of time is introduced by the subordinator “before” or “when” if the main clause denotes an action completed before that of the time clause.