Canjucks Posted January 24, 2021 Share Posted January 24, 2021 (edited) Hey all just looking to see if someone can enlighten me to the solution here. I have found thebelow errors and trying to understand how to fix it but also know how to in the future when these pop up again: ["E_RECOVERABLE_ERROR","Undefined property: stdClass::$R_exp","/modules\/installed\/levels\/levels.hooks.php",7,"2021-01-24 11:15:37"] ["E_RECOVERABLE_ERROR","Undefined property: stdClass::$R_name","\/class\/user.php",342,"2021-01-24 11:15:37"] Code in question - levels.hooks.php: <?php new Hook("userInformation", function ($user) { global $page; if ($user) { $nextRank = $user->nextRank(); if ($user->info->US_exp > $nextRank->R_exp) { <-- line has issue $page->addToTemplate("levelUp", true); } else { $page->addToTemplate("levelUp", false); } } }); User,php: $page->addToTemplate('maxRank', $this->info->maxRank); $page->addToTemplate('rank', $rank->R_name); @$page->addToTemplate('exp_perc', $expperc); $page->addToTemplate('gang', $gang); $page->addToTemplate('weapon', $weapon->I_name); $page->addToTemplate('armor', $armor->I_name); $page->addToTemplate('nextRank', $this->nextRank->R_name); <-- line has issue } TIA *** UPDATED *** So now getting the below issue with the effected lines. I don't think I had this locally though so probably not unexpected I suppose: ["E_RECOVERABLE_ERROR","Undefined property: home::$allowedMethods","/class\/module.php",72,"2021-01-24 11:37:09"] ["E_RECOVERABLE_ERROR","Invalid argument supplied for foreach()","/class\/module.php",86,"2021-01-24 11:37:09"] Line 72 of Module private function buildMethodData() { $data = $this->allowedMethods; <-- line has issue Line 86 of Module: foreach ($data as $key => $val) { Edited January 24, 2021 by Canjucks Quote Link to comment Share on other sites More sharing options...
AdamHull Posted January 24, 2021 Share Posted January 24, 2021 It doesn't look as tho you are calling the correct names, i would look in the rank class or database and see what it should be calling, I'm not fully aware of how this engine works Quote Link to comment Share on other sites More sharing options...
Canjucks Posted January 24, 2021 Author Share Posted January 24, 2021 2 minutes ago, AdamHull said: It doesn't look as tho you are calling the correct names, i would look in the rank class or database and see what it should be calling, I'm not fully aware of how this engine works It's not my code I can say lol ... maybe the creator can shed the light on it @Dayo? Quote Link to comment Share on other sites More sharing options...
Sim Posted January 24, 2021 Share Posted January 24, 2021 What mod is this happening on? Quote Link to comment Share on other sites More sharing options...
Canjucks Posted January 24, 2021 Author Share Posted January 24, 2021 11 minutes ago, Sim said: What mod is this happening on? These errors - the exp and name appear at anytime no mod in particular Quote Link to comment Share on other sites More sharing options...
Canjucks Posted January 26, 2021 Author Share Posted January 26, 2021 On 1/24/2021 at 10:26 PM, Canjucks said: Hey all just looking to see if someone can enlighten me to the solution here. I have found thebelow errors and trying to understand how to fix it but also know how to in the future when these pop up again: ["E_RECOVERABLE_ERROR","Undefined property: stdClass::$R_exp","/modules\/installed\/levels\/levels.hooks.php",7,"2021-01-24 11:15:37"] ["E_RECOVERABLE_ERROR","Undefined property: stdClass::$R_name","\/class\/user.php",342,"2021-01-24 11:15:37"] Code in question - levels.hooks.php: <?php new Hook("userInformation", function ($user) { global $page; if ($user) { $nextRank = $user->nextRank(); if ($user->info->US_exp > $nextRank->R_exp) { <-- line has issue $page->addToTemplate("levelUp", true); } else { $page->addToTemplate("levelUp", false); } } }); User,php: $page->addToTemplate('maxRank', $this->info->maxRank); $page->addToTemplate('rank', $rank->R_name); @$page->addToTemplate('exp_perc', $expperc); $page->addToTemplate('gang', $gang); $page->addToTemplate('weapon', $weapon->I_name); $page->addToTemplate('armor', $armor->I_name); $page->addToTemplate('nextRank', $this->nextRank->R_name); <-- line has issue } TIA I haven't found an answer yet. i emptied my minor error log and its filling up each time you click with both those errors. It was upto a 2 meg + file.... Quote Link to comment Share on other sites More sharing options...
Sim Posted January 26, 2021 Share Posted January 26, 2021 Reimstall? Quote Link to comment Share on other sites More sharing options...
Dayo Posted January 26, 2021 Share Posted January 26, 2021 Its a bug when you are the max rank, for now make a rank with 2b exp and ill push a fix soon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.