【问题标题】:Use of undeclared Identifier "Scoring" [closed]使用未声明的标识符“评分”[关闭]
【发布时间】:2014-02-27 20:54:48
【问题描述】:
-(void)Scoring
{
    ScoreNumber = ScoreNumber + 1;
    score.text = [NSString stringwithFormat:@"Score: %i", ScoreNumber];
}

我收到一条显示为use of undeclared identifier 'scoring' 的红色错误消息,虽然我在“game.h”中定义了得分,但我仍然收到错误消息。

我对此很陌生,感谢您的帮助!

【问题讨论】:

  • 在哪一行?你能从 Xcode 复制实际的错误消息吗?
  • 你#define 某处吗? (上面的代码中没有任何名称为scoring。)
  • 复制/粘贴到您的问题中(先按 edit)实际的错误消息以及代码中该行号周围的 10 行左右。

标签: ios objective-c


【解决方案1】:

确保大小写匹配。

得分与得分

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多