I know as provided its an infinite loop but as I mentioned in my post,
this was just a small piece of a larger code to demonstrate how I am
using set and get, not the whole code, I don't want to post the entire
code. This code gets terminated at some point as part of further code.
My problem is why setting the value and then trying to retrieve it
will give the code block I posted in my initial post instead of the
value. Infinite loop or not, it should when called respond with the
proper value, no?

On Jul 27, 5:15 pm, Anthony Lieuallen <[email protected]> wrote:
> On 7/27/2009 6:40 PM, GµårÐïåñ wrote:
>
> > GM_setValue("Number", "One");
>
> > if (GM_getValue("Number") == "One")
> > {
> >   GM_setValue ("Number", "Two");
> >   window.location.reload();
> > }
>
> > can't get any simpler than this and so why is it returning an error?
>
> Because you've written an infinite loop.  You set "number" to "one",
> then check if it is one.  This is always true.  You set it to something
> else then reload the page.  At which point you set "number" to "one",
> then .....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to