I have a fixture that I'd like to add a mask to, I'm using VSCode, and it looks like it's interpreting that the function requires two arguments. I don't have any runtime errors, and the wiki shows an example with 1 parameter. Anybody have info on how to fix this? Any reason the love2d has two params listed in the definition?
fixture:setMask requiring two arguments
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: fixture:setMask requiring two arguments
https://love2d.org/wiki/Fixture:setMask
Fixture:setMask( mask1, mask2, ... )
Those three dots mean there can be more arguments.
The number of arguments is flexible. It needs at least 1 argument but can take more.
The physics system supports up to 16 categories, so 16 is the upper limit.
I do not know how to fix the VSCode warning.
Fixture:setMask( mask1, mask2, ... )
Those three dots mean there can be more arguments.
The number of arguments is flexible. It needs at least 1 argument but can take more.
The physics system supports up to 16 categories, so 16 is the upper limit.
I do not know how to fix the VSCode warning.
Re: fixture:setMask requiring two arguments
This is not the forum for VSCode bugs. The LOVE docs are clear.
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
Re: fixture:setMask requiring two arguments
I'm not sure this is a VSCode bug, but more a result of how love2d has its definition. Any reason it's not just Fixture:setMask(mask1, ...)?
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: fixture:setMask requiring two arguments
While the wiki could be more clear, updating it won't fix that vscode extension. Like dusoft said it's a separate and independently developed piece of software.
Re: fixture:setMask requiring two arguments
In the screenshot, VScode uses the same text as the wiki. Did they parse the wiki somehow or is that docu created by hand?
Would it make sense to standardize the style a bit to make it more machine-readable?
For example: https://love2d.org/wiki/love.event.push writes things a bit different: a,b,c,d,e,f... instead of argument1, argument2, ...
For me, the totally normal human, either way is clear enough.
Would it make sense to standardize the style a bit to make it more machine-readable?
For example: https://love2d.org/wiki/love.event.push writes things a bit different: a,b,c,d,e,f... instead of argument1, argument2, ...
For me, the totally normal human, either way is clear enough.
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: fixture:setMask requiring two arguments
I believe it's a heavily modified edit of something that originated as a wiki scrape.
I'm interested in making the wiki human-readable, which is often in conflict with making it perfectly machine-readable. Given a choice between the two I'll pick the former.
Those are the actual argument names to the function (it's consistent with other var-arg listings in the wiki), they just don't have good names because they can have sort of arbitrary values.knorke wrote: ↑Fri May 03, 2024 11:54 pm For example: https://love2d.org/wiki/love.event.push writes things a bit different: a,b,c,d,e,f... instead of argument1, argument2, ...
For me, the totally normal human, either way is clear enough.
Who is online
Users browsing this forum: No registered users and 8 guests