Search found 25 matches

by nate890
Fri Jan 27, 2012 12:26 pm
Forum: Support and Development
Topic: Colour Spectrum (Fixed)
Replies: 16
Views: 2578

Re: Colour Spectrum (Odd Error)

For those who are interested how to fix such errors: I get the error "24 - Incorrect draw mode -501.333333333333", what's this mean? It means the first argument to either love.graphics.circle , love.graphics.polygon , love.graphics.rectangle or love.graphics.triangle is wrong. It has the be a DrawM...
by nate890
Fri Jan 27, 2012 12:19 pm
Forum: Support and Development
Topic: Pauses (Waits, sleeps, etc.), is it Possible?
Replies: 17
Views: 3148

Re: Pauses (Waits, sleeps, etc.), is it Possible?

"BTW, love engine is designed to run each draw/update function 60 times per second (or so), and if you force any of this function to last longer than 1/60 sec then your game has serious problem."

Actually seems to reach 300+FPS on occasion.
by nate890
Fri Jan 27, 2012 12:17 pm
Forum: Support and Development
Topic: Colour Spectrum (Fixed)
Replies: 16
Views: 2578

Re: Colour Spectrum (Odd Error)

Please post a .love file so we can test. I got it fixed. Well, really, it never was really broken, I just changed my code in here and forgot to change my actual code. The reason it was turning up black was because I had divided the number by 255 (I was using the same table in another program that n...
by nate890
Fri Jan 27, 2012 6:30 am
Forum: Support and Development
Topic: Colour Spectrum (Fixed)
Replies: 16
Views: 2578

Re: Colour Spectrum (Odd Error)

MarekkPie wrote:So is the error the error code in the first post? Or can you not see anything, but it runs?
It was black because I forgot to change the "/255" in my main code, as I had changed it on this post and confused myself
by nate890
Fri Jan 27, 2012 6:30 am
Forum: Support and Development
Topic: Colour Spectrum (Fixed)
Replies: 16
Views: 2578

Re: Colour Spectrum (Odd Error)

Fixed it, thanks for your help!
by nate890
Fri Jan 27, 2012 6:23 am
Forum: Support and Development
Topic: Colour Spectrum (Fixed)
Replies: 16
Views: 2578

Re: Colour Spectrum (Odd Error)

Try not unpacking the colors. Love can read the table as well. It seems as if that's the line that is giving you issues (I'm assuming 24 is the line where the error occurs and there isn't any other code in your file to shift the numbers.) Even if it reads the tables, I still don't see nothing. Mayb...
by nate890
Fri Jan 27, 2012 6:14 am
Forum: Support and Development
Topic: Colour Spectrum (Fixed)
Replies: 16
Views: 2578

Re: Colour Spectrum (Odd Error)

Sorry, those commas looked like periods to me. No problem. Anyway, do you know why this doesn't seem to show up on the screen? Assuming my calculations are incorrect because I really don't understand how Love2D quite works, yet. love.graphics.rectangle("fill",x/#colours*(i-(x/#colours)),0,x/#colour...
by nate890
Fri Jan 27, 2012 6:11 am
Forum: Support and Development
Topic: Colour Spectrum (Fixed)
Replies: 16
Views: 2578

Re: Colour Spectrum (Odd Error)

MarekkPie wrote:You also don't have a width or a height in your rectangle.
I thought it was rectangle(pos.x,pos.y,size.x,size.y) ?

Anyway, I have this, no error, but doesn't seem to work (Nothing shows)

Code: Select all

love.graphics.rectangle("fill",x/#colours*(i-(x/#colours)),0,x/#colours,y)
by nate890
Fri Jan 27, 2012 6:06 am
Forum: Support and Development
Topic: Colour Spectrum (Fixed)
Replies: 16
Views: 2578

Re: Colour Spectrum (Odd Error)

MarekkPie wrote:RGB-values are integers from 0-255, so you are both (according to your error) outside the bounds, and using decimal values as an input. (AKA Don't divide by 255.)
Oops, didn't notice, was using the same table from other code I wrote. Anyway, that wasn't the error, ended up fixing it.
by nate890
Fri Jan 27, 2012 6:00 am
Forum: Support and Development
Topic: Colour Spectrum (Fixed)
Replies: 16
Views: 2578

Colour Spectrum (Fixed)

local colours={} for i=1,255 do table.insert(colours,{0,0,i}) end for i=1,255 do table.insert(colours,{0,i,255}) end for i=1,255 do table.insert(colours,{0,i,0}) end for i=1,255 do table.insert(colours,{i,255,0}) end for i=1,255 do table.insert(colours,{i,0,0}) end local x=800 local y=600 function ...