expanding on the title, how do u know when 2 stop spending time on a code that is not working? or how long does it take 4 u 2 'give up'.

it just took me 7 hours of straight worthless coding (+...