QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: Petr on October 16, 2019, 10:32:16 am
-
Hi try this source code:
pieces = 66
uhel = uhel + n
X
= 400 + COS(uhel
) * 400 Y
= 300 + SIN(uhel
) * 300
X3
= 400 + COS(uhel
+ _PI / pieces
) * 400 Y3
= 300 + SIN(uhel
+ _PI / pieces
) * 300
uhel
= uhel
+ _PI / pieces
' SLEEP
X2 = B * (800 / pieces)
xx = 800 / pieces
_MAPTRIANGLE (X2
+ xx
, 0)-(X2
, 599)-(X2
+ xx
, 599), VIRTUAL&
TO(X3
, Y3
)-(X2
, 599)-(X2
+ xx
, 599), _SMOOTH
Works? OK! Press twice ALt + Enter! Invalid handle error occur. Why?
Then comment _SMOOTH in source code, recompile and run it again. Now all works fine also after twice press Alt + Enter.
-
Hi Petr! How are you?
The mistake is that you are using _SMOOTH at the place of destination handle. So, at initial condition the value of _SMOOTH is 0 (because there is no anti-aliasing). When we press ALT+ENTER twice, smooth is being enable and therefore, _SMOOTH function return -1. And QB64 treat -1 as an invalid handle.
Replace
To
Notice the double comma at the last? I think you must have understood what I wanted to say.
-
Oh man! Thank you Ashish! I didn't realize it at all! So a mistake on my side.
To your question: how am I? Well, it's not good now. Did not only us national singer Karel Gott die (of which I wrote in my forum signature and on the day of his funeral), but also the neighbor died and, to make matters worse, a colleague from work is hanged himself. Well, it was really too bad now.
I'm slowly returning to programming. Very slowly, because there is not much time and there is a lot of work around.
Thank you for your help.