我正在制作我的第一款游戏并使用dreamlo记分牌资产遇到问题。它基本上是一个简单的排行榜系统,只使用HTTP GET请求,而且没有PhP / SQL。您可以在此处详细了解:Dreamlo
使用随资产一起提供的类,我在这个函数上得到一个NullReferenceException:
public string[] ToStringArray()
{
if (this.highScores == "") return null;
string[] rows = this.highScores.Split(new char[] { '\n' }, System.StringSplitOptions.RemoveEmptyEntries);
return rows;
}
请注意,我的程序运行良好,并且显示了排行榜,但是一旦进入此功能,我就会发现有19个NullReferenceExceptions。
答案 0 :(得分:1)