sorry to bother with something that is probably pretty easy.
Here is my code now the only difference is instead of 'struct' it was a 'class'. Now it's causing the changeAmount function to no longer work. I have tried declaring it as 'let' etc, but it shows other errors. If anyone has a fix that would be great.
struct Product {
var ID : String = ""
var name : String = ""
var type : String = ""
var price : Double = 0.00
var image : String = ""
var amount : Int = 1
var imageURL : String = ""
var thumbnailURL : String = ""
var description : String = ""
init(id:String, name:String, description:String, type:String, price:Double, image:String, imageURL:String, thumbnailURL:String, amount:Int = 1) {
self.ID = id
self.name = name
self.description = description
self.type = type
self.price = price
self.image = image
self.imageURL = imageURL
self.thumbnailURL = thumbnailURL
self.amount = amount
}
func changeAmount(a:Int){ self.amount = a }
}