MOUSESTATE wont accept integers for the two button parameters

Previous topic - Next topic

MrTAToad

You get :

C:\DOCUME~1\Nicholas\LOCALS~1\Temp\glbasic\gpc_temp1f.cpp:347: error: no matching function for call to `MOUSESTATE(double&, double&, DGNat&, DGNat&)'
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:1055: note: candidates are: void __GLBASIC__::MOUSESTATE(DGInt&, DGInt&, DGInt&, DGInt&)
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:1056: note:                 void __GLBASIC__::MOUSESTATE(DGNat&, DGNat&, DGNat&, DGNat&)

Hemlos

Bing ChatGpt is pretty smart :O

MrTAToad

MOUSESTATE x,y,b1%,b2% causes the above problem

Hemlos

% is used for declaring a variable

GLOBAL b1%,b2%


MOUSESTATE x,y,b1,b2

edit:

Regardless, youre correct....an error occurs either way.
Bing ChatGpt is pretty smart :O

MrTAToad

I always use the variable type where ever a variable is used - old habit :)

Kitty Hello

Yes, please go either naturals or floating point.