Skip to content Skip to sidebar Skip to footer

Script Only Runs Once

This is a script that [should] refresh a page, find the price, and if the price is lower than what the user specifies, buys it. If the price is higher, it refreshes the page and do

Solution 1:

When you refresh, your code does not exist any more. You have a new page, with new code. When you understand this, it becomes obvious that nonexistent code won't run.


Solution 2:

Try to make your code persist even if the user refreshes the browser. Plus, check your code again, it might have some logicl error (you might have misplaced braces in the if-else part).


Post a Comment for "Script Only Runs Once"