1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

QueryData error

Discussion in 'Development' started by rektpixel, Aug 12, 2017.

  1. rektpixel

    rektpixel Baby Zombie

    Messages:
    186
    Hey I got this error in console on this plugin:
    Code:
    Notice: Undefined offset: 1 in C:\Users\Admin\Creative Cloud Files\Desktop\PymePENetwork\PPE-Hub\plugins\CrossOnlineCount-master\src\jasonwynn10\CrossOnlineCount\Main.php on line 74
    
    This is line 74 of CrossOnlineCount main:
    PHP:
                            $queryData PMQuery::query($server[0], $server[1]);
    this is the code from PMQuery::Query which it uses:
    PHP:
        public static function query(string $host$port$timeout 4) {
    so yeah I'm not the greatest at coding so please help if you know whats wrong, thanks
     
  2. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    Are you sure $server[1] exists? The error says it doesn't. Try to run var_dump($server) to see for yourself.
     
  3. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    The server ip is parsed using a : as a sepatator. The format could be something like the following:
    Code:
    yourcraftz.mcpe.me:19132
    a13455.leet.cc:13455
    192.168.0.4:19132
    Have you also made sure to use the latest version of the plugin?
     
    rektpixel likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.