Oque tem de errado neste código?

Discussion in 'Development' started by charada, Sep 14, 2020.

  1. charada

    charada Spider

    Messages:
    8
    GitHub:
    Ntem
    I was making a plugin that sells enchanted items in the gui plus the 2 item is giving an error when setting the charm what can it be?

    PHP:
    if ($itemClicked->getId() == 745) {
                if (
    $player instanceof Player) {
          
    $cash $this->eco->myCash($player);
                if(
    $cash >= 300){
                    
    $this->eco->removeCash($player"300");
        
    $inv $player->getInventory();
    $enchantment1 Enchantment::getEnchantment(16);
    $enchInstance = new EnchantmentInstance($enchantment12);
    $pik Item::get(34501);
    $pik->addEnchantment($enchInstance);
    $inv->addItem($pik);
    $player->sendMessage("§aCompra com sucesso");
                }else{
                    
    $player->sendMessage("§aVocê não tem cash para comprar esse encantamento");
                }
                }
                return 
    true;
            }
            if(
    $itemClicked->getId() == 743) {
                if(
    $player instanceof Player) {
    $cash $this->eco->myCash($player);
                if(
    $cash >= 300){
                    
    $this->eco->removeCash($player"300");
        
    $inv $player->getInventory();
    $enchantment2 Enchantment::getEnchantment(14);
    $enchInstance = new EnchantmentInstance($enchantment23);
    $esp Item::get(74301);
    $esp->addEnchantment($enchInstance;
    $inv->addItem($esp);
    $player->sendMessage("§aCompra com sucesso");
                }else{
                    
    $player->sendMessage("§aVocê não tem cash para comprar esse encantamento");
                }
                }
                return 
    true;
            }
     
  2. Primus

    Primus Zombie Pigman

    Messages:
    434
    I wonder too, what error could it be!
     
    Diduhless likes this.

Share This Page

  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.