Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Error ShowResearchPage.class.php #336

Closed
Nusuminat opened this issue Jan 18, 2018 · 8 comments
Closed

Error ShowResearchPage.class.php #336

Nusuminat opened this issue Jan 18, 2018 · 8 comments

Comments

@Nusuminat
Copy link

hello and I apologize immediately for my language of angelski.

I installed the version 1.8git and after testing it turned out that there is a fault in the Laboratory. If the test is turned on, unfortunately it can not be canceled, I do not know if this is a problem for me. in the light of the prv server

Message: Undefined offset: 108
File: /includes/pages/game/ShowResearchPage.class.php
Line: 61
URL: http: //xxxx.xxxx/game.php?page=research
PHP-Version: 5.6.32-1 + ubuntu16.04.1 + deb.sury.org + 2
PHP-API: apache2handler
2Moons Version: 1.8.git
Debug Backtrace:

0 /includes/pages/game/ShowResearchPage.class.php(61): errorHandler (8, 'Undefined offse ...', '/ includ ...', 61, Array)

1 /includes/pages/game/ShowResearchPage.class.php(342): ShowResearchPage-> CancelBuildingFromQueue ()

2 /game.php(57): ShowResearchPage-> show ()

3 {main}

@Nusuminat
Copy link
Author

Message: Undefined offset: 113
File: /includes/pages/game/ShowResearchPage.class.php
Line: 48
URL: http://xxxxxxxx.xxx/2Moons/game.php?page=research
PHP-Version: 5.6.33-1+ubuntu16.04.1+deb.sury.org+1
PHP-API: apache2handler
2Moons Version: 1.8.git
Debug Backtrace:
#0 /includes/pages/game/ShowResearchPage.class.php(48): errorHandler(8, 'Undefined offse...', 'FILEPATH ...', 48, Array)
#1 /includes/pages/game/ShowResearchPage.class.php(329): ShowResearchPage->CancelBuildingFromQueue()
#2 /game.php(57): ShowResearchPage->show()
#3 {main}

Line: 48
$costResources = BuildFunctions::getElementPrice($USER, $PLANET, $elementId, false, $PLANET[$elementId] + 1);

@Para0234
Copy link

Did you add some things? Like, some special researches?

I had this mistake when I modded it myself.

I'd advise you to try to change the language and to check the translation file because for what it seems, it looks like said translations are missing...

Does the same problem appear when you go in "technology"?

@jkroepke
Copy link
Owner

$PLANET[$elementId] looks wrong for me. It should be $PLANET[$resource[$elementId]]

Can you do this change locally and test if the error still exists?

@jkroepke
Copy link
Owner

@Nusuminat did it help?

@mimikri
Copy link

mimikri commented Jan 27, 2018

it is about research and researches are saved under prefix_users. so it should be $USER[$resource[$elementId]]

@Nusuminat
Copy link
Author

gentlemen, I did it ... and everything works perfect ...;) as for me because why you have to return raw materials;)

$costResources = BuildFunctions::getElementPrice($USER, $PLANET, $elementId, false, $PLANET[$elementId] = 0);

@jkroepke
Copy link
Owner

You should do this:

a6392d7#diff-a639f1032499d4c506b2a28ff191033fR61

@Nusuminat
Copy link
Author

👍

Xer0fire pushed a commit to Xer0fire/2Moons that referenced this issue Aug 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants