After upgrading Swift Playgrounds app all of my saved exercise code in the Learn to Code apps will not complie and run. I get weird errors that make no sense given the code I am try to run..
Here’s the actual code
moveForward()
moveForward()
turnLeft()
moveForward()
moveForward()
collectGem()
and this generates the following errors
'Double.pi' or '.pi' to get the value of correct type and avoid casting.
Error: Contents/Sources/Color.swift:53: initializer 'init(colorLiteralRed:green:blue:alpha:)' has different argument names from those required by protocol '_ExpressibleByColorLiteral' ('init(_colorLiteralRed:green:blue:alpha:)')
Error: Contents/Sources/Gem.swift:117: type 'SCNAnimationProtocol' has no member 'spinAnimation'
Warning: Contents/Sources/Scene.swift:275: 'M_PI' is deprecated: Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.
Warning: Contents/Sources/Wall.swift:76: 'M_PI_2' is deprecated: Please use 'Double.pi / 2' or '.pi / 2' to get the value of correct type and avoid casting.
Warning: Contents/Sources/Wall.swift:83: 'M_PI_2' is deprecated: Please use 'Double.pi / 2' or '.pi / 2' to get the value of correct type and avoid casting.
Warning: Contents/Sources/HelperExtensions.swift:19: 'M_PI' is deprecated: Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.
Error: Contents/Sources/Color.swift:53: initializer 'init(colorLiteralRed:green:blue:alpha:)' has different argument names from those required by protocol '_ExpressibleByColorLiteral' ('init(_colorLiteralRed:green:blue:alpha:)')
Error: Contents/Sources/Gem.swift:117: type 'SCNAnimationProtocol' has no member 'spinAnimation'
Warning: Contents/Sources/Scene.swift:275: 'M_PI' is deprecated: Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.
Warning: Contents/Sources/Wall.swift:76: 'M_PI_2' is deprecated: Please use 'Double.pi / 2' or '.pi / 2' to get the value of correct type and avoid casting.
Warning: Contents/Sources/Wall.swift:83: 'M_PI_2' is deprecated: Please use 'Double.pi / 2' or '.pi / 2' to get the value of correct type and avoid casting.
how do I fix this?