nemesis, try taking the flag check out of the function itself. try using it to either call or not call the function.
i think the problem you're experiencing now is that, and please someone correct me if i'm wrong, but i thought all variables within a function were accessable to that function only, unless defined as global?
i don't want to get this thread off on a tangent but it's been my (mis-?)understanding that functions work this way, re: variables local to that function alone. it's why i've NEVER used a function... can someone offer a yes or no to this?
@jane - it was poor practice for me to offer the example without initializing RELEASED = 0, but it's also my understanding that anything NOT intialized DOES = 0? true/not? not trying to be coy, just looking for a real answer.
also, did you try the 2 snippets? both worked appropriately for me before adding them to the post. the second
is logical to me. or, did i just get lucky?
Quote: "
"if mouseclick()=0 then released = 1
if mouseclick() and released = 1"
"
the first line tells me "the mouse button was released"
the second tells me "the mouse buttons was clicked after it was released" which is to distinguish it from what could have been "the button is STILL being clicked" and/or "the button is being clicked", which isn't enough.
edit:
i finished typing my long-winded response here while you posted yours, flashing blade. i actually got a response BEFORE i posted a question. how can you ask for more?!
Virtual Nomad
AMD XP 1800+ (~1.6 Ghz) / 1.5 GB RAM
ATI Radeon 8700LE 128 MB / Windows XP