Please debug this code

Well, I solved it. Thanks.