There is a time when prayer will not reach God - not will it do a person any good at all. That may sound like a strange thing to say - but it is true biblically. God warns those who reject His counsel and who turn away from His reproof that there will be a time when they pray and find that no one is listening.
Proverbs tells us that when our lifestyle is one that rejects God's Word and wisdom that there will be a time when due to the lack of it we will call on God and even seek Him diligently. The problem is that the reason they do this is because they want to be rescued from their bad decisions and from the consequences of their actions. Their call to God is not made out of any desire to repent and change how they are living. This kind of prayer will not receive God's answer - although it will receive His rejection.
The reason God rejects these kinds of prayers is because of the state of their hearts. These are the one who hated knowledge. They are not ignorant in human terms. In fact often those who hate knowledge are brilliant in the world's eyes. They just hate the knowledge that God has to offer to them. They hate the Word of God - and they hate the things that God has to say about the true state of humanity and the true state of this world. What I refer to is the worldview that sees mankind as fallen and sinful. There are scholars who absolutely reject that worldview. They see man as basically good. In their estimation what mankind needs is not salvation from sin - but to be resuced from those who make us feel bad about ourselves and tell us that we are sinful. They believe that if mankind was just educated properly and kept from the negativity of the Biblical view of mankind. If mankind were not told that anything was sin - but that man could claim their basic god-ness once again - then mankind would prosper and climb to a whole new level of evolution.
This was the view at the turn of the century as mankind pretty much rejected the biblical view of sin. The world thought it would rise to a whole new existance without war and without anything to hinder it. What we received from this new enlightened man was a century like no other in its ability to kill one another, make war, commit genocide, and perpetrate horrors upon one another in ways that seemed previously impossible.
When men reject God's knowledge - they also choose against the fear of God. They do not honor or respect Him - and they also do not tremble at His Word. When men do not believe God's Word - they are destined in every negative way to fulfill it. They truly will show the work of the fall of man in ways that will astound future generations. Actually future generations, just as blind as their fathers, will say that these things happened because they didn't quite do it right - or because they need an even more God-rejecting philosophy. In so doing they fulfill what verse 30 says. They would not accept God's counsel and they spurn all His reproof. Even as they watch the truth of God come to pass and His worldview upheld again and again, they reject it. Blind guides of the blind, they reject the existance of the very pit into which they lead one another as they continue in their rebellion.
Please understand that I know that such writing as this is very depressing. But it is only depressing if we continue to reject God's Word and the counsel, knowledge, understanding, and truth that comes from it. For those who accept God's counsel there is an answer to the futility of mankind and the stupidity of his ways. There is the grace of God in the gospel of Jesus Christ. There is a savlation that God grants us and offers to us through His Son. There is a hope that when we embrace God's ultimate worldview - we not only see our sinfulness - but we are also allowed to see our Savior as well. God graces us with forgiveness, regeneration, and His ongoing work of sanctification. We are redeemed, literally bought from the slave market of sin and given the glorious hope of heaven and fellowship with God for all eternity.
There have been and will continue to be those who scorn the negative message that MUST come to mankind for there to be hope. They will say that it is the negative message itself that is the problem - and that if we would just rid ourselves of it - all would be well. But they do not understand that the so-called negative-ness of that message is absolutely necessary in order for us to get the most glorious message of the ages - God's salvation through His Son, the Lord Jesus Christ! You cannot have one without the other. If you reject the message that we are sinners - and choose instead to spurn God's truth and counsel - all that awaits you is deception, destruction, and ultimately death.