[solved] Canvas:renderTo with arguments

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
BrotSagtMist
Party member
Posts: 640
Joined: Fri Aug 06, 2021 10:30 pm

[solved] Canvas:renderTo with arguments

Post by BrotSagtMist »

I am trying to draw a circle directly to a canvas. Like

Code: Select all

canvas=love.graphics.newCanvas()
canvas:renderTo(love.graphics.circle,"fill",9,9,9)
The wiki states:
Canvas:renderTo( func, ... )
is the syntax, assuming that means func is called with ... as its arguments.
But regardless of what is written there, i am always getting Error: bad argument #1 to '?' (string expected, got no value)
Am i dumb or is this a bug?
Last edited by BrotSagtMist on Sat Jun 22, 2024 12:08 pm, edited 1 time in total.
obey
User avatar
pgimeno
Party member
Posts: 3601
Joined: Sun Oct 18, 2015 2:58 pm

Re: Canvas:renderTo with arguments

Post by pgimeno »

If you are using 11.5, then it is a bug. Otherwise it's normal. According to the wiki, the `...` arguments are only supported from 11.5 on. I don't have 11.5 installed yet, so I can't test it.
User avatar
BrotSagtMist
Party member
Posts: 640
Joined: Fri Aug 06, 2021 10:30 pm

Re: Canvas:renderTo with arguments

Post by BrotSagtMist »

Oh, i see, no i have 11.4.
I actually checked for version in the wiki first thing and the ... syntax is also listed there, i was unaware its not actually working.
Thanks.
obey
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests