错误:在冒号之前期待右翼

时间:2013-04-06 06:18:20

标签: actionscript-3 flash

我正在编写动作脚本,我似乎无法在此代码块中找到问题 请帮忙。

部分代码:

    private function constructCommunicatorAndConnect() : void
    {
        var cHost:* = ExternalData.splashServerHosts[this.m_nSplashServerIndex];
        var nPort:* = int(ExternalData.splashServerPorts[this.m_nSplashServerIndex]);
        var cSocket:* = new ReconnectingStringSocket(cHost, nPort, new RandomXORScrambler(68, 47));
        cSocket.addEventListener(ReconnectingStringSocket.RECONNECTING, function (event:Event) : void
        {
            MultiplayerContainer.addTextToConsole("Lost splash connection, trying to reconnect...");
            return;
        }// end function
        );
        cSocket.addEventListener(ReconnectingStringSocket.RECONNECTING_SUCCESSFUL, function (event:Event) : void
        {
            MultiplayerContainer.addTextToConsole("Splash connection succesfully reestablished");
            return;
        }// end function
        );
        this.m_cSplashCommunicator = new SplashCommunicator(cSocket, MultiplayerContainer.player.com.miniclip.multiplayer.container.player:ILocalPlayer::sessionID, MultiplayerContainer.player.userID, ExternalData.gameID, this);
        this.m_cSplashCommunicator.connect();
        MultiplayerContainer.addTextToConsole("Connecting to splash server #" + this.m_nSplashServerIndex + " (" + cHost + ":" + nPort + ") with session \"" + MultiplayerContainer.player.sessionID + "\"");
        dispatchEvent(new Event(COMMUNICATOR_CONSTRUCTED));
        return;
    }// end function

错误发生在

this.m_cSplashCommunicator = new SplashCommunicator(cSocket, MultiplayerContainer.player.com.miniclip.multiplayer.container.player:ILocalPlayer::sessionID, MultiplayerContainer.player.userID, ExternalData.gameID, this);

一些相关功能:

public function SplashCommunicator(param1:StringSocket_i, param2:String, param3:String, param4:String, param5:ISplashListener)
    {
        super(param1, param5);
        param1.setSocketEventHandler(this.handleSocketEvent);
        param1.addEventListener(Event.CONNECT, this.socketConnected);
        this.m_cSessionID = param2 != null ? (param2) : ("");
        this.m_cUserID = param3 != null ? (param3) : ("");
        this.m_cGameID = param4;
        this.m_cListener = param5;
        return;
    }// end function

1 个答案:

答案 0 :(得分:0)

继承你的问题,检查你的代码

     .player:ILocalPlayer::sessionID, Multiplaye // check these ::
      whatever = new whatever(somemorestuff,hi{in here is where you have ::::::::::},outside);

参见上面的模式,冒号在括号内(MC {x:200,y:200}); 我希望你跟着我