IsLeftMouse and StrinRequest possibly bug?
Posted: Sun Aug 28, 2011 9:40 pm
I am currently trying to isolate the exact problem, but this one seems bit weird one so Im throwing you a question already Andreas in case you happen to have some idea what can cause this.
I am suspecting this problem has to do with usage of stringrequest, but that is just a guess.
In my program, It checks IF left mouse button is pressed with IsLeftMouse(), then it goes through If Statements and does its things.
Strange thing however is, that I have there 3 different IF possibilities, two which have StringRequest functions in them.
If either of those StrinRequest IF places is executed, it seems that program decides that IsLeftMouse() is always TRUE. And that is very weird.
I also tried changing IsLeftMouse() to IsKeyDown("w") and then it worked like it was supposed to, so it clearly is something to do with the IsLeftMouse() thing. I am however not sure if it is a bug, or maybe property.
The program is somewhat big, but to shorten the idea, it is like this:
As i mentioned, when tileset is 1, no problem, it works right, but if tileset is 2 or 3, it keeps repeating it again and again. And the reason why it keeps repeating it again and again is because it for some reason decides that mousebutton=1.
And as i mentioned, If i change this:
It works fine.
So do you maybe already know what is possibly going on here?
I am trying to isolate the problem to be repeatable by only couple of lines of code, but thought while doing that I ask in case you already know the answer to this one, since right now it seems it could be a bug in the IsLeftMouse() command, and cause could be anything in the program.
I am suspecting this problem has to do with usage of stringrequest, but that is just a guess.
In my program, It checks IF left mouse button is pressed with IsLeftMouse(), then it goes through If Statements and does its things.
Strange thing however is, that I have there 3 different IF possibilities, two which have StringRequest functions in them.
If either of those StrinRequest IF places is executed, it seems that program decides that IsLeftMouse() is always TRUE. And that is very weird.
I also tried changing IsLeftMouse() to IsKeyDown("w") and then it worked like it was supposed to, so it clearly is something to do with the IsLeftMouse() thing. I am however not sure if it is a bug, or maybe property.
The program is somewhat big, but to shorten the idea, it is like this:
Code: Select all
leftmousebutton = IsLeftMouse()
If Leftmousebutton = 1
If tileset=1
does stuff
elseif tileset=2
does stuff plus stringrequests
elseif tielset=3
does stuff plus strinrequests
endif
endif
And as i mentioned, If i change this:
Code: Select all
mousebutton = IsLeftMouse()
to
mousebutton = IsKeyDown("w")So do you maybe already know what is possibly going on here?
I am trying to isolate the problem to be repeatable by only couple of lines of code, but thought while doing that I ask in case you already know the answer to this one, since right now it seems it could be a bug in the IsLeftMouse() command, and cause could be anything in the program.