嗨,我正在尝试运行脚本以从所有数据存储中获取信息。
我正在运行的代码脚本出现错误:
if let _ = someThing { let spacing: CGFloat = 30.0 if viewController.parent == nil { return } if #available(iOS 11.0, *) { viewController.additionalSafeAreaInsets.top = spacing } else { NSLayoutConstraint.activate([ viewController.view.topAnchor.constraint(equalTo: viewController.topLayoutGuide.bottomAnchor , constant: spacing), viewController.bottomLayoutGuide.bottomAnchor.constraint(equalTo:viewController.view.bottomAnchor, constant: 0) ]) } } else { if #available(iOS 11.0, *) { viewController.additionalSafeAreaInsets.top = 0 } else { NSLayoutConstraint.activate([ viewController.view.topAnchor.constraint(equalTo: viewController.topLayoutGuide.bottomAnchor, constant: 0) ]) } }
该脚本是一个简单的for循环:
At C:\Users\Administrator\Desktop\Scripts\test.ps1:125 char:2
+ $allstoreinfo += $storeinfo
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (op_Addition:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound