I've been wracking my mind the last several hours in trying to fix this single error in Xcode 6.2 using swift.
spriteName = "tiki-top-0\(rand)"
var toptiki = SKSpriteNode(imageNamed: spriteName)
//This line gives me the error
toptiki.position = CGPointMake(0, bottomtiki.position.y + heightBetweenObstacles)
tikiSet.addChild(toptiki)
toptiki.physicsBody = SKPhysicsBody(rectangleOfSize: toptiki.size)
toptiki.physicsBody?.dynamic = false
toptiki.physicsBody?.categoryBitMask = category_tiki
toptiki.physicsBody?.contactTestBitMask = category_car
I've been searching everywhere and for some reason I really just think there's a syntax error somewhere. I've had the same issue with the physicsBody?.contactTestBitMask since the update to Xcode 6 and it's betas where as before the '?' was not necessary. But now for some reason it has to be chained.
I'm not using a CGFloat here, why is it telling me I shouldn't be using an int?
Any help is greatly appreciated, I really can't fry my brain any further, lol