Please help me. I updated to Xcode 10
where is a Swift 4.2
. And now format %ld
(also others) doesn't work anymore. Who knows what should I use instead that?
let name = String(format: "Pic_%ld", value)
Part of code:
if value != 0 && value != 6 && value != 9 {
let name = String(format: "Pic_%ld", value)
print("Pic_%ld")
print(value)
let tileNode = SKSpriteNode(imageNamed: name)
print(name)
tileNode.size = CGSize(width: Width, height: Height)
var point = pointFor(column: column, row: row)
point.x -= Width/2
point.y -= Height/2
tileNode.position = point
tilesLayer.addChild(tileNode)
}
And see that
Pic_%ld
-4
2018-09-23 19:46:52.799361+0800 [20784:2265405] SKTexture: Error loading image resource: "Pic_-4"
Pic_-4