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

$event->getMessage() == "test" dont work

Discussion in 'Facepalm' started by Levi, Sep 16, 2017.

  1. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    [​IMG]
    PHP:
    if($ev->getMessage() == "test"){
    $ev->getPlayer()->sendMessage("hi");
    }
    do not work when the letters are smaller than the normal letters size
    here's the difference between small and big letters\font
    [​IMG]
     
    Last edited: Sep 16, 2017
  2. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    There is probably a symbol before that text to make it the "small font" simply var_dump($ev->getMessage()) to see what it is.
     
  3. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    i've never used var_dump before, is it
    PHP:
    if(var_dump$ev->getMessage() == "test"){
    ?
     
  4. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    jasonwynn10 and Levi like this.
  5. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    This is the most noob thing I've seen all day... look up the function online before you just try it randomly.
     
  6. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    why lookup when someone's kind enough to help lmao
     
  7. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    Because you should learn to solve things on your own. Creating plugins this way will take you ages!
     
  8. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    o_O
     
  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.