Sessions..... i Need Help (agian)

Posted by KadePcGames
Will This Work?

(Sorry for repost)

Update:
New Code
show_message("Loged In")
if global.session_id == -1
{
    gms_session_create(1)
    show_message("None Found. Created One")
    room_goto_next()
} else {
if gms_session_player_count(global.session_id) < 2
{gms_session_join(global.session_id);
    show_message("Found A Game. Joining")
    gms_session_join(global.session_id);
    if gms_info_isconnected()
    {
    room_goto_next()
    } else {
    gms_connect()
    room_goto_next()
}
}
}

Will it work?

Replies (2)

Last message on 16 Jul 2017

Size43 (Administrator) on 16 Jul 2017, 16:27:19
Probably?

Are you having any issues getting it to work?
KadePcGames (Topicstarter) on 16 Jul 2017, 18:58:28
Well it works pretty good really this is the new code i made
show_message("Loged In")
var session = gms_session_find_type_(1);
if session {
{
    if gms_session_player_count(session) < 2
{gms_session_join(session);
    show_message("Found A Game. Joining")
    if gms_info_isconnected()
    {
    room_goto_next()
    } else {
    gms_connect()
    room_goto_next()
    }
} else {
show_message("Found A Game. Joining")
show_message("Sorry Its Full")
show_message("Created One")
gms_session_create(1);
if gms_info_isconnected()
    {
    room_goto_next()
    } else {
    gms_connect()
    room_goto_next()
    }
    }
}
} else {
    gms_session_create(1)
    show_message("None Found. Created One")
    room_goto_next()
}

If anyone wants it