Search found 6 matches
- Tue Jun 05, 2018 3:09 am
- Forum: Support and Development
- Topic: MacOS Dropping Support of OpenGL
- Replies: 4
- Views: 4897
MacOS Dropping Support of OpenGL
Apple recently made this announcement regarding OpenGL: "Apps built using OpenGL and OpenCL will continue to run in macOS 10.14, but these legacy technologies are deprecated in macOS 10.14. Games and graphics-intensive apps that use OpenGL should now adopt Metal. Similarly, apps that use OpenCL...
- Sun May 11, 2014 11:50 pm
- Forum: General
- Topic: Error: attempt to compare number with boolean
- Replies: 4
- Views: 3712
Re: Error: attempt to compare number with boolean
Don't use error for debugging. It terminates the program. The problem is most likely not in the first iteration, but at a later time. Use assert or print instead. Actually, error is kind of useful to see if a branch of execution is ever reached. But that's pretty much all I can think of using it fo...
- Sun May 11, 2014 4:52 pm
- Forum: General
- Topic: Error: attempt to compare number with boolean
- Replies: 4
- Views: 3712
Re: Error: attempt to compare number with boolean
The problem has to be somewhere else. We need the rest of your code to help you. Best from I can tell, you do one of two things: - You name the variable as false (i.e. player.xvel = false) and then update, before changing the value. - You have some condition that is called before updating that make...
- Sun May 11, 2014 8:31 am
- Forum: General
- Topic: Error: attempt to compare number with boolean
- Replies: 4
- Views: 3712
Error: attempt to compare number with boolean
So, I have a simple snippet of code among much more code... if (newx > self.x) or (newx < self.x) then player.xvel = 0 end and when I run it, I get this error... Error player.lua:18 attempt to compare number to boolean Alright, seems rather straightforward. But then I try... error(newx) or... error(...
- Mon Feb 17, 2014 6:07 am
- Forum: Support and Development
- Topic: Problem with pcall() and Object:type()
- Replies: 3
- Views: 2271
Re: Problem with pcall() and Object:type()
That is because pcall calls its first argument. Pcall is defined as follows: if you call pcall(f, ...), it calls f(...) in protected mode. You are giving it a string as a function to call, and this then errors. (You'll see that try[2] is "attempt to call a string value".) I'm not sure if ...
- Sun Feb 16, 2014 8:09 am
- Forum: Support and Development
- Topic: Problem with pcall() and Object:type()
- Replies: 3
- Views: 2271
Problem with pcall() and Object:type()
So here's my problem in a nutshell. When I do this... player.image = love.graphics.newImage("sprites/Dodger.png") error(player.image:type()) I get... Image which is just what I'd expect. But... when I use a protected call... player.image = love.graphics.newImage("sprites/Dodger.png&qu...