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