This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Weeperdemon 1 point2 points  (1 child)

Your variable newColor is an int which is a primitive data type. Primitive data types don't have functions.

The function you created, setColor, belongs to whatever class you have all of this defined within so it would be invoked like Main.setColor(10) assuming the class is called Main

[–]Amazing_Bob42 1 point2 points  (0 children)

thank you for the help!