Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

why

Comments in 'Plugin Development' started by Puzzleo, Nov 26, 2013.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Problem at "@all" and "@a"
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    "@all" cannot be used (I think),
    and (I think) "@a" can only be used at console running, e.g., "/tell @a I am talking to everyone but you think I am talking private to you".
    In PHP syntax foreach() should be used like this:
    PHP:
    foreach($iAmAnArray as $tempVarName)...
    However "@a" cannot be converted into an array.
    Moreover, Player::tppos() or PlayerAPI::teleport, one of them or both, uses Vector3 as parameter. (I forgot)
  3. Puzzleo
    Offline

    Puzzleo Banned

    Joined:
    Sep 7, 2013
    Posts:
    88
    Minecraft User:
    puzzleo
    PHP:
     if ($name == true){
    $players=$this->api->player->getAll();
            foreach(
    $players as $player){
       
            
    $player->teleport(new Position($x$y$z$level));
            
    $issuer->sendChat("[TPALLWARP] all players have been warped!");

    }
    }
    what about this it still crashes thought
  4. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    What is the error? Also the message should be outside the foreach
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Upgrade to 1.3.10 and copy the shown-on-console error here.
  6. Puzzleo
    Offline

    Puzzleo Banned

    Joined:
    Sep 7, 2013
    Posts:
    88
    Minecraft User:
    puzzleo
    i have and it is only when cammand is used same with first on
    ```
    # PocketMine-MP Error Dump Tue Nov 26 08:18:23 GMT 2013
    Error: array (
    'type' => 1,
    'message' => 'Cannot break/continue 1 level',
    'file' => 'C:\\Users\\Ivett\\Desktop\\PocketMine-MP\\src\\API\\PluginAPI.php(87) : eval()\'d code',
    'line' => 155,
    )

    Code:
    [146]
    [147]
    [148]
    [149]
    [150]
    [151]
    [152]
    [153]
    [154]
    [155]
    [156]
    [157]
    [158]
    [159]
    [160]
    [161]
    [162]
    [163]
    [164]
    [165]


    PM Version: Alpha_1.3.10 #618 [Protocol 12]
    Commit: 0000000000000000000000000000000000000000
    uname -a: Windows NT IVETT-PC 6.1 build 7601 (Windows 7 Home Premium Edition Service Pack 1) i586
    PHP Version: 5.5.6
    Zend version: 2.5.0
    OS : WINNT, win
    Debug Info: array (
    'tps' => 19.8598,
    'memory_usage' => '13.3MB',
    'memory_peak_usage' => '13.7MB',
    'entities' => 1,
    'players' => 1,
    'events' => 12,
    'handlers' => 6,
    'actions' => 24,
    'garbage' => 0,
    )


    Parameters: array (
    'input' =>
    array (
    ),
    'commands' =>
    array (
    'enable-ansi' => true,
    ),
    'flags' =>
    array (
    ),
    )


    server.properties: array (
    'server-name' => 'Minecraft: PE Server',
    'description' => 'Server made using PocketMine-MP',
    'motd' => 'Welcome @player to this server!',
    'server-ip' => '',
    'server-port' => 19132,
    'server-type' => 'normal',
    'memory-limit' => '128M',
    'last-update' => 1385453773,
    'white-list' => false,
    'spawn-protection' => '16',
    'view-distance' => '10',
    'max-players' => 20,
    'allow-flight' => false,
    'spawn-animals' => true,
    'spawn-mobs' => true,
    'gamemode' => 0,
    'hardcore' => false,
    'pvp' => true,
    'difficulty' => 1,
    'generator-settings' => '',
    'level-name' => 'world',
    'level-seed' => '',
    'level-type' => 'DEFAULT',
    'enable-query' => true,
    'enable-rcon' => false,
    'rcon.password' => '******',
    'send-usage' => true,
    'auto-save' => true,
    )


    Loaded plugins:
    tpall 1.3 by puzzleo


    Loaded Modules: array (
    0 => 'Core',
    1 => 'bcmath',
    2 => 'calendar',
    3 => 'ctype',
    4 => 'date',
    5 => 'ereg',
    6 => 'filter',
    7 => 'ftp',
    8 => 'hash',
    9 => 'iconv',
    10 => 'json',
    11 => 'mcrypt',
    12 => 'SPL',
    13 => 'odbc',
    14 => 'pcre',
    15 => 'Reflection',
    16 => 'session',
    17 => 'standard',
    18 => 'mysqlnd',
    19 => 'tokenizer',
    20 => 'zip',
    21 => 'zlib',
    22 => 'libxml',
    23 => 'dom',
    24 => 'PDO',
    25 => 'Phar',
    26 => 'SimpleXML',
    27 => 'wddx',
    28 => 'xml',
    29 => 'xmlreader',
    30 => 'xmlwriter',
    31 => 'curl',
    32 => 'sqlite3',
    33 => 'sockets',
    34 => 'shmop',
    35 => 'pthreads',
    36 => 'com_dotnet',
    37 => 'mhash',
    38 => 'xdebug',
    )
    Memory Usage Tracking:
    s9QzM/F10jHQMbA2NNYzBDINdQwB
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Which line is line 155?
  8. Puzzleo
    Offline

    Puzzleo Banned

    Joined:
    Sep 7, 2013
    Posts:
    88
    Minecraft User:
    puzzleo
    155 }
    156 break;
  9. Puzzleo
    Offline

    Puzzleo Banned

    Joined:
    Sep 7, 2013
    Posts:
    88
    Minecraft User:
    puzzleo
    and it wont load the plugin without line 155
  10. Puzzleo
    Offline

    Puzzleo Banned

    Joined:
    Sep 7, 2013
    Posts:
    88
    Minecraft User:
    puzzleo
  11. Bugs Bunny
    Offline

    Bugs Bunny Banned

    Joined:
    Dec 6, 2013
    Posts:
    11
    Minecraft User:
    Bugs Bunny
    im just looking at the code cant read it

Share This Page

Advertisement