Error in GetMouse (line 239)
screenRect=Screen(‘GlobalRect’,windowPtrOrScreenNumber);
Error in mouseresponse (line 110)
[x2,y2,buttons2]=GetMouse(window);
I have three different while loops, each one is a level. when mouse response for level 1 is met, it goes to 2 and then to level 3 if the mouse response for level 2 is met. The problem is i’m unable to make it step out of level 2 even after the mouse response. I’m guessing there is something wrong with my mouse initiation in level 2.
The error is what it says, when you call
[x2,y2,buttons2]=GetMouse(window); the variable “window” does not contain a window pointer. Window pointer is the thing you use to Screen(‘flip’) and such as well.
I strongly recommend you first do some of Peter Scarfe’s tutorials and really understand them, or if you have access, have a chat with someone who knows PTB around you. That’ll help you resolve a lot of these things yourself.
Hi, thanks for taking your time to respond. i have gone through the online tutorials but its still not clear to me. As far as i understand window pointer refers to the window just opened right. I’m not sure why it does not recognizes the pointer. this is how i have initiated it. It would be extremely helpful if you could point out where i could be wrong.
If there is an error in your code somewhere after you have opened your screen, the screen may be forced to close, and a subsequent call with the window pointer will cause an error as the window pointer is no longer valid…