Well first of all, you’re passing a Color3 pointer into an overloaded function that takes two different references.
You have a range of options:
- Don’t pass a pointer (you have
Color3 colorinmain(), don’t pass&color, passcolor) - De-reference the pointer to pass a reference (having a
Color3* colorinmain(), pass*colornotcolor) - Change the method or add one to accept a
Color3pointer. This is dumb and I don’t advise it. But you can!
Also I know it’s not a part of the question but it appears getRed, getGreen, and getBlue are methods that you should append () to.
2
solved C++ Multiple Static Functions With Same Name But Different Arguments [closed]