Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPatrick Duhamel
5,786 PointsIn your ViewController.swift, did your declare a variable named quantity as shown at 0:52 of the video?
2 Answers
Gavin Hobbs
5,205 PointsHey jordon beyond I'm running into the same bug. Patrick Duhamel what video did you mean when you said...
did your declare a variable named quantity as shown at 0:52 of the video?
Gavin Hobbs
5,205 PointsI asked the question with all my code attached and I got an answer that fixed my bug! Here's a link to that forum post...
My bug was on line 24 in ViewController.swift
. I needed to declare:
var quantity = 1
jordon beyond
2,158 Pointsjordon beyond
2,158 PointsUse of unresolved identifier 'quantity' Do you mean QuantityLabel? I checked on the VendingMachine.swift file and changed the func vend() accordingly, any one else have the same problem ?