user6510422 user6510422 - 6 months ago 41
Swift Question

Why is this tuple ambiguous without more context in swift 3?

After reviewing code that worked a few months ago, can some explain how to fix this error? The error that shows says "Type of expression is ambiguous without more context".

var products = [("Kayak","A boat for one person","Watersports",275.0,10),
("Lifejacket","Protective and fashionable","Watersports",48.95,14),
("Soccer Ball","FIFA-approved size and weight","Soccer",19.5,32),
("Corner Flags","Give your playing field a professional touch","Soccer",34.95,1),
("Stadium","Flat-packed 35,000-seat stadium","Soccer",79500.0,4),
("Improve your brain efficiency by 75%","Chess",16.0,8),
("Unsteady Chair","Secretly give your opponent a disadvantage","Chess",29.95,3),
("Human Chess Board","A fun game for the family","Chess",75.0,2),
("Bling-Bling King","Gold-plated,diamon-studded King","Chess",1200.0,4)]


This line :

("Improve your brain efficiency by 75%","Chess",16.0,8),

only has 2 strings instead of 3. The name of the activity (?) seems to be missing.