I start learning lua. Yesterday everything was going perfect to me then something I don't really know happened and can't open window. I changed absolutely nothing but today I cannot set background or place graphics, text etc. Here is code example but nothing actually works correct
https://paste.ubuntu.com/p/xRJFdGx6TH/
noobie stuck at beginning. Need help!
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 1
- Joined: Mon Feb 01, 2021 7:02 pm
Re: noobie stuck at beginning. Need help!
Code: Select all
love.graphics.setBackgroundColor(244/255, 100/255, 100/255)
love.graphics.setColor(233/255, 0, 233/255)
-
- Prole
- Posts: 3
- Joined: Fri Jan 15, 2021 3:02 pm
Re: noobie stuck at beginning. Need help!
The reasoning for this is:darkfrei wrote: ↑Mon Feb 01, 2021 9:18 pmCode: Select all
love.graphics.setBackgroundColor(244/255, 100/255, 100/255) love.graphics.setColor(233/255, 0, 233/255)
The Function setColor or setBackgroundColor wants Numbers between 0 and 1, not 0 to 255 as its Parameters.
See Documentation: https://love2d.org/wiki/love.graphics.setColor or https://love2d.org/wiki/love.graphics.s ... roundColor
Re: noobie stuck at beginning. Need help!
It will be nice to have any format:
Code: Select all
r=r>1 and r/255 or r
g=g>1 and g/255 or g
b=b>1 and b/255 or b
Re: noobie stuck at beginning. Need help!
Actually 0-255 format was supported in the previous versions, so now the easiest way is just to divide by 255 as suggested.
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
Who is online
Users browsing this forum: No registered users and 5 guests