Jump to content

MouseX Int Problem


Benton
 Share

Recommended Posts

Hey guys,

 

I know this is not the right forum, but I have not yet payed for Leadwerks, I am getting my funds in order, and I just have a quick question. I want to see if MouseX and MouseY are more or less then a number.

 

if MouseX > 1 then

 

However it says I cannot compare a function with an integer.

 

How can I do this in LUA?

Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D

Link to comment
Share on other sites

In what context are you using this - what for?

 

By the way posting here is fine! I have leadwerks yet I still use the general discussion mostly.

Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5.

 

 

 

Life is too short to remove USB safely.

Link to comment
Share on other sites

In onUpdate. I want to know where the mouse is on the screen, because depending on where it is something needs to happen. Oh, and how do I do concatenation in Lua?

Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D

Link to comment
Share on other sites

Actually a better question is: MouseX and MouseY are "functions" and I can't do concatenation and all that stuff with them cause they are not integers or strings. So what do I do?

Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D

Link to comment
Share on other sites

The answer is in the error message: 'cannot compare a function with an integer'. You are trying to compare the function and not its value, you need the brackets after the function name:

 

if MouseX() > 1

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...