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

Help

Discussion in 'Plugin Help' started by RoccoYT, Oct 14, 2019.

  1. RoccoYT

    RoccoYT Spider

    Messages:
    14
    GitHub:
    RoccoTheDev
    Was ist in line 79 der fehler Screenshot_20191014_161651_com.ansm.anwriter.pro.jpg
     
  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Well what does your console show you?

    DE: Naja, was zeigt denn deine Konsole so an?
     
  3. Fadhel

    Fadhel Witch

    Messages:
    68
    GitHub:
    dimbis
    the bug is he used $sender->getPlayer() ; for variable $player "$player = $sender->getPlayer();". he should've used $player = $sender; and check if the player "sender" is player to send them the UI.
     
  4. Deniel

    Deniel Spider Jockey

    Messages:
    42
    GitHub:
    DenielWorld
    Isn't sender an instance of Player?
     
  5. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Not always. And there are no checks for that in the code shown.
     
  6. Deniel

    Deniel Spider Jockey

    Messages:
    42
    GitHub:
    DenielWorld
    Exactly that was what I was trying to point at lol, because I don't think you can do getPlayer from a sender instance.
     
  7. Primus

    Primus Zombie Pigman

    Messages:
    749
    PHP:
    if($sender instanceof Player) {
        
    // ... 
    }
     
  8. RoccoYT

    RoccoYT Spider

    Messages:
    14
    GitHub:
    RoccoTheDev
    [QUOTE = "HimbeersaftLP, Beitrag: 67047, Mitglied: 50"] Nun, was zeigt Ihnen Ihre Konsole?

    DE: Naja, was zeigt denn deine Konsole so an? [/ QUOTE]
    Die console zeigt Fehler in Line 79
     
  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.