Dice Roll App Error

Hi Code Community, I have an error with the Dice Roll App and I’m not sure what I’ve done. I have followed the Tutorial to a T (Well I Believe I have), and I get this error on Line 30 of the screen shot. Thanks in advance for your help, Cheers Cam

Can you post the video link to the tutorial?

Sorry, The link to the tutorial by Codewithchris that I’m following or a link to my actual project? and how do I do that lol

Hi Cam,

Cheers. Let me have a look at it first.

Oh I see the problem.

On line 30 you need to move the " to the other side of the closing bracket ) at the end.

label.text = “The Sum is: (firstNumber + secondNumber)”

Thanks Chris, I went over it multiple times checking I had everything right, can’t believe I missed that. That fixed it and the Build succeeded but then hit another error, see attached.

Yes the old key value coding compliance.

Did you by chance create a connection from your leftImageView and then discover that you had a typo so changed it in ViewController?

If you did then changing the name that way will break the outlet connection between storyboard and your ViewController.

What you will have to do is delete the connection and re-create it. In so doing you will have to remove the remnant connection that still exists in storyboard. To do that go to your storyboard and select the ViewController by tapping on the left most icon at the top of the ViewController (arrowed).

Over in the right hand Inspector panels you need to select the Connections Inspector (the circle with the arrow pointing to the right).

Look for any Amber triangle against the outlets on the right hand side (indicated by the elongated ellipse) and if there are any, click the little x immediately to the left (indicated by the arrow) to remove it.

Now you can recreate your leftImageView outlet.

Yes that was the issue thanks Chris. I obviously changed the name in trying to fix the other issue. App all working now thanks again.