Here are some scriptures regarding when our prayers may not be answered:
James 4:3 -- "You ask and do not receive, because you ask amiss, that you may
spend it on your pleasures."
James 1:7, 8 -- "For let not that man suppose that he will receive anything
from the Lord; he is a double-minded man, unstable in all his ways."
Job 35:12, 13 -- "There they cry out, but He does not answer, because of
the pride of evil men. Surely God will not listen to empty talk, nor will the Almighty
regard it."
Psalm 18:41 -- "They cried out, but there was none to save; even to the
Lord, but He did not answer them."
Psalm 66:18 -- "If I regard iniquity in my heart, the Lord will not
hear."
Proverbs 1:28-31 -- "Then they will call on me, but I will not answer; they
will see me diligently, but they will not find me. Because they hated knowledge and did
not choose the fear of the Lord, they would have none of my counsel and despised my every
rebuke. Therefore they shall eat the fruit of their own way, and be filled to the full
with their own fancies."
In the Spirit-Filled Life Bible
(of which Pastor Hayford served as General Editor) the study notes under Psalm 66:18 read:
Avoid nullifying your prayers by planning, harboring, or entertaining sin or wickedness
in your heart.