-1

When I was finally done with the script and had the program check it I tried to change it to specifically what it said was wrong but now I get

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

I am puzzled as what to do, help would be nice!

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     
hyde
  • 60,639
  • 21
  • 115
  • 176

1 Answers1

4

You're missing a then after your final elseif, and missing tons of ends.

Mud
  • 28,277
  • 11
  • 59
  • 92