ArgumentNullException:参数不能为null c#(Unity)

时间:2018-04-27 05:32:21

标签: c# android unity3d

这是我的代码:

onclick="window.location='{{ Request::url() }}'"

我的 tzPlayInfo 值是这样的:

string playerwinnopairboth = "P  ";

IEnumerator WinLog_big_road()
{
    string[] historyvalue = { };
    historyvalue = tzPlayInfo.Instance.HistoryValue;
    /*-------------------------------*/
    NetworkManager.instance.WebSocketServer.OnCallBack_SC_WEBSOCKET_BcGametableHistory += CallBack_CS_WEBSOCKET_BcGametableHistory;
    /*-------------------------------*/
    DeleteChildrens(pos_big_road);
    yield return new WaitForEndOfFrame();
    for (int i = 0; i < rh.Const._HISTORY_COUNT_CARD_ * rh.Const._HISTORY_DECK_; i++)
    {
        int x = i % rh.Const._HISTORY_COUNT_CARD_;
        int y = i / rh.Const._HISTORY_COUNT_CARD_;

        float xl = 2.0f;
        float yl = -5.0f;

        GameObject o = Instantiate(prefab_big_road) as GameObject;
        o.transform.SetParent(pos_big_road);
        o.transform.localScale = Vector3.one;


        o.transform.localPosition = new Vector3(x * xl, y * yl, 0f);
        if (historyvalue.Contains(playerwinnopairboth))
        {
            //o.GetComponent<UISprite>().spriteName = "layout_player_bigline-01";
            //NGUITools.SetActive(o, true);
            Debug.Log("PLAYER WIN, NO PAIR , NO PAIR");
        }
}


private void CallBack_CS_WEBSOCKET_BcGametableHistory(bool success, Int32 gametable_no, Int32 year, Int32 month, Int32 day, Int32 shoe_no, bc_gametable_history_list list)
{
    string s1 = "";
    for (int i = 0; i < tzPlayInfo.Instance.bc_gametable_history_list.Count; i++)
    {
        s1 += tzPlayInfo.Instance.bc_gametable_history_list[i].r;
        s1 += ",";
    }
    tzPlayInfo.Instance.HistoryValue = s1.ToString().Split(',');
}

错误指出我在这里

private string[] historyvalue;
public string[] HistoryValue
{
    get { return historyvalue; }
    set { historyvalue = value; }

}

我不知道为什么它会给我一个空值。有人能指出我在这里做错了什么。提前感谢那些能帮助我的人......

0 个答案:

没有答案