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

Correct tag?

Discussion in 'Development' started by rektpixel, Apr 21, 2017.

  1. rektpixel

    rektpixel Baby Zombie

    Messages:
    186
    Hi I got this plugin that displays your stats on the side of the screen called ScoreTip, to display the deaths and kills it relies on the KillChat plugin to do so, but that plugin now has loads of errors so I decided to change it from getting plugin KillChat and instead use StatsPE I have changed everything that says 'KillChat' to 'StatsPE' but the part I need help with is the part that uses the death and kill tag or whatever you call it

    Before I changed the ScoreTip from getting KillChat to StatsPE it looked like this:

    PHP:
          if ($this->KillChat) {
                        
    $kll $this->KillChat->getKills($name);
                        
    $dth $this->KillChat->getDeaths($name);
                    } else {
                        
    $kll $dth =  '§cNo Plugin';
    When I changed it to StatsPE it looked like this:

    PHP:
          if ($this->StatsPE) {
                        
    $kll $this->StatsPE->getKills($name);
                        
    $dth $this->StatsPE->getDeaths($name);
                    } else {
                        
    $kll $dth =  '§cNo Plugin';
    But the problem is I get this error in console:

    [PocketMine] [13:21:08] CRITICAL> Error: "Call to undefined method SalmonDE\StatsPE::getKills()" (EXCEPTION) in "/ScoreTip/src/ScoreTip/Main" at line 58

    I just don't know what the correct tag to use and I have know idea how to find it in StatsPE, I have tried getKillCount as well but that didnt work. I have uploaded the StatsPE and ScoreTip below in a zip if anyone could tell me what that 'get????????' tag is that would be amazing
    Thanks
     

    Attached Files:

  2. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    Look into StatsPE's source code, and find it yourself.
    maybe @SalmonDE Can help you
     
  3. rektpixel

    rektpixel Baby Zombie

    Messages:
    186
    did i not mentieions taht i donot no howz ti do htat. thets y i askd 4 halp ;-;
     
  4. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    No, you didn't. Use proper grammar, I cannot understand a word you're saying!
     
  5. rektpixel

    rektpixel Baby Zombie

    Messages:
    186
    did I not mention that I do not know how to do that. thats why I asked for help.
    *Code cracked*
     
  6. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    Oh. you shouldn't be in here until you have some basic knowledge of PHP, API etc
     
  7. rektpixel

    rektpixel Baby Zombie

    Messages:
    186
    I think that's incorrect. the forum rules dont say that. *PHP, API* API :p lollollollollollollollol
     
    MC ATECH likes this.
  8. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    You can get the amount of kills by doing:
    PHP:
    $statspe = \SalmonDE\StatsPE\Base::getInstance();
    $entry $statspe->getDataProvider()->getEntry("KillCount");
    $killCount $statspe->getDataProvider()->getData("PlayerName"$entry);
     
  9. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    I didn't say that... I said you should've have basic knowledge * or I meant it
     
  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.