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

'Float' is a special class name error

Comments in 'Plugin Development' started by Skullex, Apr 2, 2016.

Thread Status:
Not open for further replies.
  1. Skullex
    Offline

    Skullex Active Member

    Joined:
    Nov 14, 2015
    Posts:
    212
    Minecraft User:
    Skullex
    I don't understand this error, what happened??
    Code:
    Fatal error: Cannot use pocketmine\nbt\tag\Float as Float because 'Float' is a special class name in C:\Users\jross\OneDrive\Documents\GitHub\Genisys-Installer\Genisys\plugins\BedWarsPE-master\src\BedWars\BedWars.php on line 31
    
    PHP:
    <?php

     
    namespace BedWars

     
    //PM use
    use pocketmine\math\Vector3;
    use 
    pocketmine\block\Block;
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\command\ConsoleCommandSender;
    use 
    pocketmine\IPlayer;
    use 
    pocketmine\utils\Config;
    use 
    pocketmine\permission\PermissionAttachment;
    use 
    pocketmine\permission\Permission;
    use 
    pocketmine\Player;
    use 
    pocketmine\Server;
    use 
    pocketmine\plugin\Plugin;
    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\utils\TextFormat;
    use 
    pocketmine\level\Level;
    use 
    pocketmine\level\Position;
    use 
    pocketmine\level\particle\FloatingTextParticle;
    use 
    pocketmine\item\Item;
    use 
    pocketmine\tile\Tile;
    use 
    pocketmine\tile\Sign;
    use 
    pocketmine\tile\Chest;
    use 
    pocketmine\nbt\tag\ByteTag;
    use 
    pocketmine\nbt\tag\CompoundTag;
    use 
    pocketmine\nbt\tag\DoubleTag;
    use 
    pocketmine\nbt\tag\EnumTag;
    use 
    pocketmine\nbt\tag\FloatTag;
    use 
    pocketmine\nbt\tag\IntTag;
    use 
    pocketmine\nbt\tag\ShortTag;
    use 
    pocketmine\nbt\tag\StringTag;
    Am I missing something?? Do you need the entire code?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Which line is line 31?
  3. Skullex
    Offline

    Skullex Active Member

    Joined:
    Nov 14, 2015
    Posts:
    212
    Minecraft User:
    Skullex
    use pocketmine\nbt\tag\FloatTag;
  4. Intyre
    Offline

    Intyre Staff Member PocketMine Team

    Joined:
    Aug 24, 2013
    Posts:
    118
    Minecraft User:
    Intyre
    Do you use PocketMine? :)
Thread Status:
Not open for further replies.

Share This Page

Advertisement