Undefined inex Universe

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

    • Undefined inex Universe

      Hello, maybe someone else who use 2moons master as a core have this bug? Fleet stuck after this.

      Issue: Undefined index: universe
      File: /includes/classes/class.PlanetRessUpdate.php (Line 92)

      line 92:

      Source Code

      1. $this->CONF= Config::getAll(NULL, $this->USER['universe']);
      Need hosting ? Register at A2 Hosting
      Receive FREE DOMAIN AND TURBO WEBHOSTIG
      Register A2Hosting here



    • Hello

      Be aware that line #92 doesn't correspond to an existing line in the official pack due to your change or an old pack you are using,

      Can you provide the whole function.. or atleast some lines before and after the error line ?
      I remember having this error aswell but fixed it in my XTERIUM pack, so if i have a little bit more info to remember, i can probably point you on the good path

      Do you maybe also have a complete backtrace of the error log ?

      Sincerely,
      jeremy
      - Xterium Template
      - War of Alliance Template
      - Antaris-Legacy Template
      - Ogame Template

      I can and will only help with instalation with hostings including cpanel or plesk and an teamviewer access
    • This is the whole function:

      Source Code

      1. public function CalcResource($USER = NULL, $PLANET = NULL, $SAVE = false, $TIME = NULL, $HASH = true)
      2. {
      3. $this->isGlobalMode = !isset($USER, $PLANET) ? true : false;
      4. $this->USER = $this->isGlobalMode ? $GLOBALS['USER'] : $USER;
      5. $this->PLANET = $this->isGlobalMode ? $GLOBALS['PLANET'] : $PLANET;
      6. $this->TIME = is_null($TIME) ? TIMESTAMP : $TIME;
      7. $this->config = Config::get($this->USER['universe']);
      8. if($this->USER['urlaubs_modus'] == 1)
      9. return $this->ReturnVars();
      10. if($this->Build)
      11. {
      12. $this->ShipyardQueue();
      13. if($this->Tech == true && $this->USER['b_tech'] != 0 && $this->USER['b_tech'] < $this->TIME)
      14. $this->ResearchQueue();
      15. if($this->PLANET['b_building'] != 0)
      16. $this->BuildingQueue();
      17. }
      18. $this->UpdateResource($this->TIME, $HASH);
      19. if($SAVE === true)
      20. $this->SavePlanetToDB($this->USER, $this->PLANET);
      21. return $this->ReturnVars();
      22. }
      Display All
      Error log:

      Source Code

      1. [10-Feb-2019 13:50:41] NOTICE: "Undefined index: universe"
      2. File: /../.../.../.../classes/class.PlanetRessUpdate.php | Line: 98
      3. URL: game.php?page=galaxy | Version: 1.8.git
      4. Stack trace:
      5. #0 /class.PlanetRessUpdate.php(98): errorHandler(8, 'Undefined index...', '/../..../...', 98, Array)
      6. #1 missions/MissionCaseAttack.class.php(88): ResourceUpdate->CalcResource(Array, false, true, '1549755315')
      7. #2 class.FlyingFleetHandler.php(80): MissionCaseAttack->TargetEvent()
      8. #3 /includes/FleetHandler.php(31): FlyingFleetHandler->run()
      9. #4 /includes/common.php(125): require('/.../.../...')
      10. #5 /game.php(24): require('/.../.../...')
      11. #6 {main}
      Display All
      Need hosting ? Register at A2 Hosting
      Receive FREE DOMAIN AND TURBO WEBHOSTIG
      Register A2Hosting here



    • Hello,

      The error is coming from the mission file and not the planetresupdate a you though.

      The universe information is missing in the query... do you know if the attack was on a deleted planet or a planet that has been deleted after the mission has been launched ? like a destruction of a moon or something...

      Do your database have more then one universe or are your universe like me all with an ID 1 ?

      Sincerely,
      - Xterium Template
      - War of Alliance Template
      - Antaris-Legacy Template
      - Ogame Template

      I can and will only help with instalation with hostings including cpanel or plesk and an teamviewer access

      The post was edited 1 time, last by Thisishowwedoit ().

    • Yes it because there is a missing moon. But I am interested how to fix this. If for example you send two fleets on same moon and first fleet destroys the moon, then other fleet just return back to base.
      Need hosting ? Register at A2 Hosting
      Receive FREE DOMAIN AND TURBO WEBHOSTIG
      Register A2Hosting here



    • Thats easy to fix
      Check my attack mission file in xteriim and you will see the fix

      Iam on my mobile so k can not post the exact line but you simply have to make a pre check to see if that planet still exit in your db and if not make fleets go back home
      - Xterium Template
      - War of Alliance Template
      - Antaris-Legacy Template
      - Ogame Template

      I can and will only help with instalation with hostings including cpanel or plesk and an teamviewer access
    • @Thisishowwedoit Thanks the problem is fixed.

      Maybe another question, i also get this error:

      Source Code

      1. [12-Feb-2019 12:18:26] NOTICE: "Undefined offset: 2"
      2. File: /../.../.../includes/pages/game/ShowBuildingsPage.class.php | Line: 99
      3. URL: https://eogame.eu/game.php?page=buildings | Version: 1.8.git
      4. Stack trace:
      5. #0 /../../game/ShowBuildingsPage.class.php(99): errorHandler(8, 'Undefined offse...', '/../.../...', 99, Array)
      6. #1 /includes/pages/game/ShowBuildingsPage.class.php(447): ShowBuildingsPage->RemoveBuildingFromQueue(3)
      7. #2 /game.php(57): ShowBuildingsPage->show()
      8. #3 {main}
      9. [12-Feb-2019 12:18:59] NOTICE: "Undefined offset: 2"
      10. File: /../../public_html/includes/pages/game/ShowBuildingsPage.class.php | Line: 99
      11. URL: https://eogame.eu/game.php?page=buildings | Version: 1.8.git
      Display All

      This error happens when you have for example two building page tabs opened and you add 3 buildings in a build list, then cancel the last building, go to other page and when you cancel it there you get this undefined offset errors, because it wont regognice the building id.
      Need hosting ? Register at A2 Hosting
      Receive FREE DOMAIN AND TURBO WEBHOSTIG
      Register A2Hosting here