C
C#2y ago
solomoncyj

❔ need some code fixing

this is actually a traslation of code from a program "bubble blaster" from this book
14 Replies
ero
ero2y ago
the errors aren't exactly vague do you expect us to just... do all of this for you?
solomoncyj
solomoncyjOP2y ago
just explin how to fix one of each type and i will be on my way
ero
ero2y ago
i mean. alright i guess? the errors are very self-explanatory. and without context, nobody can really tell you how to fix them the first couple mean that you're using the types wrong. in line 223 for example you're using a SolidBrush where it expects a Point[] and a Point[] where it expects a Color the does not contain a definition errors mean that whatever type you're trying to access a method or property on does not contain this method or property
solomoncyj
solomoncyjOP2y ago
this is actually a traslation of code from a program "bubble blaster" from this book
ero
ero2y ago
sure
phaseshift
phaseshift2y ago
Don't you get tired of asking the same 'pls fix' question and getting no response? @solomoncyj
Jester
Jester2y ago
graphics has no move method, you will have to use the draw methods to draw the ships and bubbles
HimmDawg
HimmDawg2y ago
Also this. CreatePolygon has no overload that takes a brush
Jester
Jester2y ago
thats draw polygon not create
HimmDawg
HimmDawg2y ago
Riiiight, nvm that then But still, the signature of CreatePolygon must be something else than CreatePolygon(Brush, Point[])
shipId = canvas.CreatePolygon(new[]
{
new Point(5, 5),
new Point(5, 25),
new Point(30, 15)
}, Color.Red);
shipId = canvas.CreatePolygon(new[]
{
new Point(5, 5),
new Point(5, 25),
new Point(30, 15)
}, Color.Red);
There we go
Omnissiah
Omnissiah2y ago
are you inverting parameters order or something
ero
ero2y ago
money's on chatgpt
solomoncyj
solomoncyjOP2y ago
you are 100% correct
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server