Closed luttje closed 1 year ago
Would likely need to hardcode it if you really want people to be able to use that, pretty niche functionality though, if I were to personally use it I'd be fine with adding a diagnostic ignore for the line.
Thanks for your input, this helps me know I'm on the right track. :)
I'll probably hardcode it in the future!
For now I'll use this issue as a call for help to anyone who knows which other functions have overloads like this:
I know Color
can take strings for whatever reason (since it uses tonumber
).
You probably also want to hardcode Color
to return a Color
instead of table
(or maybe their wiki should be changed instead)
Also unrelated to this, probably want to handle default values, since calling Color(1, 2, 3)
causes a warning (because of the alpha argument being missing, which is set to 255 by default as per the wiki)
Let me know if I should make these into separate issues
Made into separate issue.
Now trying the extension, same thing that a lot of extensions struggle with is the need to hardcode SERVER
, CLIENT
and MENU_DLL
as boolean?
s
Angle supports two ways of calling the function: https://wiki.facepunch.com/gmod/Global.Angle
Sadly we currently only parse one way, which can result in this error:![image](https://user-images.githubusercontent.com/2738114/235455804-b4ab520a-3293-4c0d-b4b2-78837c3ccdd4.png)
If the wiki was consistent we could automatically use
@overload
, but the alternative usage is described in a form that seems non-trivial to parse: