Problem with level opening

This is the code