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

Solved Enchant Help

Discussion in 'Help' started by BattleAlan, Mar 7, 2019.

  1. BattleAlan

    BattleAlan Spider

    Messages:
    13
    It always happen.I try to fix but still error
    PHP:
    $ce $this->getServer()->getPluginManager()->getPlugin("PiggyCustomEnchants");
                
    $player->sendMessage("§7You are using §0Dragon §7GKit");
                
    $a Item::get(27601);
                
    $Blind CustomEnchants::getEnchantmentByName($Blind);
                
    $Poison CustomEnchants::getEnchantmentByName($Poison);
                
    $Lifesteal CustomEnchants::getEnchantmentByName($Lifesteal);
                
    $Aerial CustomEnchants::getEnchantmentByName($Aerial);
                
    $BlessedCustomEnchants::getEnchantmentByName($Blessed);
                
    $Disarmor CustomEnchants::getEnchantmentByName($Disarmor);
                
    $Backstab CustomEnchants::getEnchantmentByName($Backstab);
                
    $Rage CustomEnchants::getEnchantmentByName($Rage);
                
    $a $ce->addEnchantment($a$Blind3);
                
    $a $ce->addEnchantment($a$Poison3);
                
    $a $ce->addEnchantment($a$Lifesteal4);
                
    $a $ce->addEnchantment($a$Aerial2);
                
    $a $ce->addEnchantment($a$Blessed2);
                
    $a $ce->addEnchantment($a$Disarmor1);
                
    $a $ce->addEnchantment($a$Backstab2);
                
    $a $ce->addEnchantment($a$Rage2);
                
    $player->getInventory()->addItem($a);
                
    $player->getInventory()->removeItem(Item::get($this->getConfig()->get("id-6"), $this->config->get("data-6"), 1));
            }
        }
    And have this error
    PHP:
    "Undefined variable: Blind" (EXCEPTIONin "plugins/StickEffect.phar/src/YumikoMC/Loader" at line 99
    Plz help me
     
  2. radondev

    radondev Silverfish

    Messages:
    21
    GitHub:
    radondev
    PHP:
    $Blind CustomEnchants::getEnchantmentByName($Blind);
    It looks like you're redefining the variable. What is its value before?
     
  3. BattleAlan

    BattleAlan Spider

    Messages:
    13
    A CE
     
  4. radondev

    radondev Silverfish

    Messages:
    21
    GitHub:
    radondev
    What do you mean with CE?
     
    Last edited: Mar 8, 2019
  5. BattleAlan

    BattleAlan Spider

    Messages:
    13
    I just want to enchant the CE on item A
     
  6. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    For all similar lines change like so
    PHP:
    $Blind CustomEnchants::getEnchantmentByName($Blind);
    ...
    $Rage CustomEnchants::getEnchantmentByName($Rage);
    to
    PHP:
    $Blind CustomEnchants::getEnchantmentByName("Blind");
    ...
    $Rage CustomEnchants::getEnchantmentByName("Rage");
     
    QuiverlyRivalry likes this.
  7. BattleAlan

    BattleAlan Spider

    Messages:
    13
    Thx u dude
     
  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.