Deck of Cards

Hi, so I keep getting this message and I don't know what it means. Have any of you gotten it before?

The screenshot does not show an error.

For the benefit of people who want to help you, please copy and paste code into your post directly, surrounded by triple-backticks (```) on the line before and after, like so:

struct Foo { }

Also, please keep your questions about the same topic in a single thread, rather than starting a new thread every time you have a new question about the same topic.

• • •

I haven’t studied the code you posted in depth, but a quick glance reveals a number of things that point to some misunderstandings you might have.

Could you describe in words what you want the code to do, what you have tried doing, what does and what does not make sense to you, and what errors you are getting from the compiler?

1 Like

It appears that the rawValue property of your Card.Number type has type String, not Int, so maxValue is also of type String.

You're trying to crate a range from an Int to a String, which cannon be done.