So some friends and me are programming a consolegame in Cs and I want to do a function (progressClick) which requires a int (in this case a coordinate for a rectangle) But it says that I dont have a correct value for the int even tho i gave them one (100).
What do I have to do?
AddElement(
new Circle()
{
//Hand zum klicken
R = 100,
CX = 550,
CY = 500,
Fill = "orange",
Stroke = "red",
StrokeWidth = 40,
OnClick = progressClick(100),
}
);
Update();
}
public void progressClick(EventArgs args, int Ycord)
{
AddElement(
new Rectangle()
{
X = 150,
Y = Ycord,
Width = 10,
Height = 60,
Fill = "transparent",
Stroke = "orange",
StrokeWidth = 100
}
);
Update();
}
I tried doing a function without Eventargs args but then there was a mistake with the void in “public void” part of the function