-1

当我最终完成脚本并让程序检查它时,我试图将其更改为它所说的错误但现在我明白了

Title_Function_Network.lua:40:
    `end' expected (to close `if' at line 18) near `<eof>'

我很困惑该怎么做,帮助会很好!

function Title.Network ( )

if ( system.getOSType ( ) == system.kOSTypeIPhone) then
    network.searchForServers ( network.kBluetoothServerPort )
else
    network.searchForServers ( network.kDefaultServerPort )

    network.setCurrentServer ( gameserve.mcuniverse.iruletech.com )

local hCurrentServer = network.getCurrentServer ( )
    if ( hCurrentServer )
then
    if (server.getStatus ( "hCurrentServer") == "server.kStatusNone")
then
     log.message ( "No Server's could be connected to! Reload the Application and try again!" )
    log.warning ( "No Server's open disconnecting!" )
   elseif ( server.getStatus (hCurrentServer) == server.kStatusPending)
    then
    log.message ( "Server's are pending please wait!" )
elseif (server.getStatus ( hCurrentServer) == "serverkStatusConnected" )
    then
        local hCurrentSession = server.getCurrentSession ( hCurrentServer )
    if (hCurrentSession == nil )
    then
        log.message ( "Entering Session : Default" )
        server.setCurrentSession ( hCurrentServer, "Default" )
elseif ( session.getStatus ( hCurrentSession ) == "session.kStatusPending")
    then
        log.message ( "Current Session Status: Pending" )
elseif (session.getStatus ( hCurrentSession ) ==session.kStatusConnected)
    end
end     
4

1 回答 1

4

您在thenfinal 之后缺少 a elseif,并且缺少大量ends。

于 2014-04-04T00:57:41.267 回答