[DEPRECATED] Problem with personal statistics

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [DEPRECATED] Problem with personal statistics

      Good morning,
      Here is a problem, it is now several days that I break my teeth ...
      When I click on "Kaporal - Personal statistics" I have an error that appears

      Java Source Code

      1. base.js:297 Uncaught ReferenceError: isPlayerCardActive is not defined
      2. at Object.Playercard (base.js:297)
      3. at HTMLAnchorElement.onclick (game.php?page=overview:591)

      However this code exist

      Java Source Code

      1. Playercard: function(ID) {
      2. return isPlayerCardActive && Dialog.open('game.php?page=playerCard&id='+ID, 650, 600);
      3. },


      I do not understand from or may come the error, I tried with this code

      Java Source Code

      1. Playercard: function(ID) {
      2. return Dialog.open('game.php?page=playerCard&id='+ID, 650, 600);
      3. },

      The pop up opens but no information is displayed in it .... Anyone could help me please ?
    • Hello, open your console for vour if everything is well loaded as well as js errors
      Web developer to your listening for any help or creation of mod and bug correction ask me. :D

      //Available Mod Prices
      - Mod Mercenairy => 30€
    • When I see your mistakes there are also in the topnav.js more your function does not exist. Made a ctrl + f5 several times where emptied the cache of your browser to load the new code js
      Web developer to your listening for any help or creation of mod and bug correction ask me. :D

      //Available Mod Prices
      - Mod Mercenairy => 30€
    • For the topnav.js this is normal there is not enough resource so the beug function.
      This does not help the fact that the page Personal statistics not opening ...
      Why tell me that the function does not exist?
      I forget what?
    • isPlayerCardActive What is a variable or just a function ?
      If this is a function you should call it like this isPlayerCardActive()

      For the html part you had this code

      HTML Source Code

      1. onclick="return Dialog.Playercard(ID, 'USERNAME');"
      Web developer to your listening for any help or creation of mod and bug correction ask me. :D

      //Available Mod Prices
      - Mod Mercenairy => 30€
    • Hello,

      Please open styles/templates/game/main.header.tpl

      Find

      JavaScript Source Code

      1. var queryString = "{$queryString|escape:'javascript'}";
      Add after it


      JavaScript Source Code

      1. var isPlayerCardActive = "{$isPlayerCardActive|json}";
      Xterium The Game

      I do only fix 2moons default errors with the help of this forum. Dedicated support can be asked via email to support[@]xterium.space.
    • Hello,

      Also add in includes/pages/game/AbstractGamePage.class.php

      PHP Source Code

      1. 'isPlayerCardActive'=> isModuleAvailable(MODULE_PLAYERCARD),
      after

      PHP Source Code

      1. 'date' => explode("|", date('Y\|n\|j\|G\|i\|s\|Z', TIMESTAMP)),
      You can take reference on this: github.com/jkroepke/2Moons/com…d52e1e327598712772e5be8ce
      Xterium The Game

      I do only fix 2moons default errors with the help of this forum. Dedicated support can be asked via email to support[@]xterium.space.