Online Issue

Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Online Issue

    Hi,

    I got a new template Forsaken_Flynn. I have problem getting online players from database. Using MuCore 1.0.8(Image : Screenshot by Lightshot)



    Thanks


  2. #2
    Proficient Member testers121 is offline
    MemberRank
    Sep 2015 Join Date
    198Posts

    Re: Online Issue

    website use odbc or mssql ?

  3. #3
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Re: Online Issue

    Quote Originally Posted by testers121 View Post
    website use odbc or mssql ?
    odbc.

  4. #4
    Proficient Member testers121 is offline
    MemberRank
    Sep 2015 Join Date
    198Posts

    Re: Online Issue

    Quote Originally Posted by Tukas View Post
    odbc.
    change to mssql and should work

  5. #5
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Re: Online Issue

    Quote Originally Posted by testers121 View Post
    change to mssql and should work
    How do I create MySql and connect database from game database to web?

    Thanks

  6. #6
    Proficient Member testers121 is offline
    MemberRank
    Sep 2015 Join Date
    198Posts

    Re: Online Issue

    Quote Originally Posted by Tukas View Post
    How do I create MySql and connect database from game database to web?

    Thanks
    lol :D

    search in config.ini

    /*-------------------------------------*\
    | MUCore SQL Connection Type: |
    | |
    | MSSQL : Connect using mssql_conect() |
    | ODBC : Connect using odbc |
    \*-------------------------------------*/


    $core['connection_type'] = "ODBC";

    and change to MSSQL

  7. #7
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Re: Online Issue

    Quote Originally Posted by testers121 View Post
    lol :D

    search in config.ini

    /*-------------------------------------*\
    | MUCore SQL Connection Type: |
    | |
    | MSSQL : Connect using mssql_conect() |
    | ODBC : Connect using odbc |
    \*-------------------------------------*/


    $core['connection_type'] = "ODBC";

    and change to MSSQL

    I know how to change that but anyway I got mssql installed on xampp but still doesn't work. It says that my website is offline.

  8. #8
    Proficient Member testers121 is offline
    MemberRank
    Sep 2015 Join Date
    198Posts

    Re: Online Issue

    Quote Originally Posted by Tukas View Post
    I know how to change that but anyway I got mssql installed on xampp but still doesn't work. It says that my website is offline.
    MSSQL - its sql server connection to your database. On xampp is Mysql. Show your config.ini

  9. #9

    Re: Online Issue

    @Tukas
    what u mean web is offline? u need to use MSSQL first of all on mucore websites.. odbc is used mostly on older files season or something and not recommended because it doesnt connect to all the database areas.

    Fix that, tell us why u have problem with mssql what errors u get etc and we will help ya.

  10. #10
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Re: Online Issue

    OK so now the MuCore is on MSSQL. But still I receive same value "0" for Online Users... The rest are OK. Guilds,characters,accounts created. But Online just shows 0. Any other options?

    Thanks guys!

  11. #11
    Valued Member FanStar is offline
    MemberRank
    Sep 2011 Join Date
    HomeLocation
    104Posts

    Re: Online Issue

    Quote Originally Posted by Tukas View Post
    OK so now the MuCore is on MSSQL. But still I receive same value "0" for Online Users... The rest are OK. Guilds,characters,accounts created. But Online just shows 0. Any other options?

    Thanks guys!
    use this codes

    mssql_select_db( "MuOnline" );
    $on1 = mssql_query("SELECT count(memb___id) from MEMB_STAT where ConnectStat = '1'");
    $on = mssql_fetch_row($on1);
    <tr>
    <td>Online Players</td>
    <td align="right"><?=$on[0];?></td>
    </tr>

  12. #12
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: Online Issue

    I manipulate rather procedural programming method but try this

    ("SELECT * FROM MEMB_STAT WHERE ConnectStat = '1' ")
    Procedural

    $online = mssql_num_rows(mssql_query("SELECT * FROM MEMB_STAT WHERE ConnectStat = '1' "));

    echo $online;
    - - - Updated - - -

    Quote Originally Posted by FanStar View Post
    use this codes
    counting rows in the database would rather vote for

    mssql_num_rows
    And do not forget the condition when the number of rows 0!
    It could look something like this

    if($online < 1) { $online = "0"; }
    Last edited by leorond; 21-02-16 at 02:51 PM.

  13. #13
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Re: Online Issue

    Thanks guys, but it seems to be the same.. It doesn't show users online at all..

    Screenshot by Lightshot
    Screenshot by Lightshot

  14. #14
    if(!caffeine) continue; leorond is online now
    MemberRank
    Jul 2012 Join Date
    Czech RepublicLocation
    489Posts

    Re: Online Issue

    Create a file test.php and insert this code

    PHP Code:
    <?php
    $connect
    ['IP']                    =    "127.0.0.1";    //    server IP
    $connect['login']                =    "sa";            //    server login
    $connect['pass']                =    "....";        //    server password
    $connect['database']            =    "MuOnline";        //    database name
    $conn    =    mssql_connect($connect['IP'],    $connect['login'],    $connect['pass'])    or    die("<center>Can't Connect To Database</center>");
    $db        =    mssql_select_db($connect['database'],    $conn)    or    die("<center>Can't Connect To Database</center>");

    $online mssql_num_rows(mssql_query("SELECT * FROM MEMB_STAT WHERE ConnectStat = '1' "));

    echo 
    "Online:".$online;
    ?>
    Access to this file over a fixed URL address

    for example

    http://domain.tld/test.php

    If you do not print the number of online players, the error is elsewhere.

  15. #15
    Member Tukas is offline
    MemberRank
    Feb 2016 Join Date
    IrelandLocation
    73Posts

    Re: Online Issue

    Quote Originally Posted by leorond View Post
    Create a file test.php and insert this code

    PHP Code:
    <?php
    $connect
    ['IP']                    =    "127.0.0.1";    //    server IP
    $connect['login']                =    "sa";            //    server login
    $connect['pass']                =    "....";        //    server password
    $connect['database']            =    "MuOnline";        //    database name
    $conn    =    mssql_connect($connect['IP'],    $connect['login'],    $connect['pass'])    or    die("<center>Can't Connect To Database</center>");
    $db        =    mssql_select_db($connect['database'],    $conn)    or    die("<center>Can't Connect To Database</center>");

    $online mssql_num_rows(mssql_query("SELECT * FROM MEMB_STAT WHERE ConnectStat = '1' "));

    echo 
    "Online:".$online;
    ?>
    Access to this file over a fixed URL address

    for example

    http://domain.tld/test.php

    If you do not print the number of online players, the error is elsewhere.
    Thanks, but it still shows value of 0..



Page 1 of 3 123 LastLast

Advertisement