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

BuildBattle

Discussion in 'Plugin Help' started by CreeperMonster, Jun 1, 2017.

  1. CreeperMonster

    CreeperMonster Slime

    Messages:
    81
    GitHub:
    CreeperMonster
    Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in C:\Users\lenovo\Documents\PocketMine-MP\plugins\BuildBattle-minigame-pocketmine-master\src\Dan\BB.php on line 2


    the plugin namespace : namespace Dan;

    src -> Dan -> bb.php and resetmap.php
    Whats wrong ? If you want more info,Ill give it to you
     
  2. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    Can we see the first few lines of BB.php?
     
  3. CreeperMonster

    CreeperMonster Slime

    Messages:
    81
    GitHub:
    CreeperMonster
    <?php
    namespace Dan;
    use pocketmine\plugin\PluginBase;
    use pocketmine\event\Listener;
    use pocketmine\utils\TextFormat as TE;
    use pocketmine\utils\Config;
    use pocketmine\command\CommandSender;
    use pocketmine\command\Command;
    use pocketmine\scheduler\PluginTask;
    use pocketmine\event\player\PlayerInteractEvent;
    use pocketmine\event\player\PlayerLoginEvent;
    use pocketmine\event\player\PlayerQuitEvent;
    use pocketmine\event\player\PlayerMoveEvent;
    use pocketmine\level\Position;
    use pocketmine\Player;
    use pocketmine\tile\Sign;
    use pocketmine\level\Level;
    use pocketmine\event\block\BlockBreakEvent;
    use pocketmine\event\block\BlockPlaceEvent;
    use pocketmine\event\player\PlayerItemHeldEvent;
    use pocketmine\event\entity\EntityInventoryChangeEvent;
    use pocketmine\event\player\PlayerDropItemEvent;
    use Dan\ResetMap;
    use pocketmine\level\sound\PopSound;
    use pocketmine\level\sound\AnvilUseSound;
    use pocketmine\item\Item;
    use pocketmine\event\entity\EntityLevelChangeEvent;
    class BB extends PluginBase implements Listener {

    there you go
     
  4. CreeperMonster

    CreeperMonster Slime

    Messages:
    81
    GitHub:
    CreeperMonster
    Now What ._.
     
  5. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    It appears the error is most usually caused by having a space in front of the <?php tag. Can you check that in your file? Also, you may want to see this StackOverflow question for other possible solutions.
     
  6. CreeperMonster

    CreeperMonster Slime

    Messages:
    81
    GitHub:
    CreeperMonster
    check the image --- > http://imgur.com/a/EpmFE
     
  7. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    It is somewhat difficult to tell from an image like that.
     
  8. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Delete the first 5 lines and type them again using an appropriate input method.
     
  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.