[MOD] [v1.8] Bank Corrected

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

    • [MOD] [v1.8] Bank Corrected

      Bank System
      Name : Bank
      Version : 2moons 1.8
      created by : Hike
      Correction + Changed by: JudgeDead
      password : [Blocked Image: http://ingrus.net/frbull/en/images/no.png]

      Changelog :

      * FIX resource names that cause errors
      * ADD Darkmatter
      Files

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

    • you have to change the int column by double (255,0)
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      My game Ounivers
      Project 2moons3.0 / Downloading
    • habe ich jetzt gemacht, aber es ist immer das selber :(

      edit:

      vorher:
      "
      $depot_metal = HTTP::_GP('depot_metal', 0);
      $depot_cristal = HTTP::_GP('depot_cristal', 0);
      $depot_deuterium = HTTP::_GP('depot_deuterium', 0)
      "
      nachher:
      "
      $depot_metal = HTTP::_GP('depot_metal', 1.0);
      $depot_cristal = HTTP::_GP('depot_cristal', 1.0);
      $depot_deuterium = HTTP::_GP('depot_deuterium', 1.0)
      "

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

    • Wahrscheinlich verstehst du gar nicht erst, was HTTP::_GP macht, verstehe auch nicht warum der Wert 1,0, deinen Fehler beheben sollte?
      Daher gibt es auch keinen Support für "Entwickler" die es nicht einmal schaffen in eine andere Datei auf zu machen um zu verstehen was die Funktion _GP macht.


      :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown: :thumbdown:


      Na aber Gott sei Dank, bin ich so ein netter Typ und verlinke dir die Datei, da du das wahrscheinlich sowieso nie selbst gemacht hättest oder danach gesucht hättest.
      github.com/jkroepke/2Moons/blo…lasses/HTTP.class.php#L48
    • Danter14 wrote:

      you have to change the int column by double (255,0)
      Sa is in the database
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      My game Ounivers
      Project 2moons3.0 / Downloading
    • Of course it's probably in the database Danter14, but people should may think about the stuff. I mean how can u lead and develop a game if u do not even know what variable types are and what they are for? Anyway such issues can easily be fixed within seconds by simply googling it.

      Anyway regarding to it's sql file, they are already doubles.
    • XenQen wrote:

      Of course it's probably in the database Danter14, but people should may think about the stuff. I mean how can u lead and develop a game if u do not even know what variable types are and what they are for? Anyway such issues can easily be fixed within seconds by simply googling it.

      Anyway regarding to it's sql file, they are already doubles.

      I know that the community of now does not want to learn anymore and that they want to be done in their place.
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      My game Ounivers
      Project 2moons3.0 / Downloading
    • hey, ich will nichts klauen oder weiter verkaufen, ich möchte lernen und das mache ich auch, habe vieleicht vor 1 monat angefangen c++,html,php,js und sql zu lernen. hier geht nicht um irgendetwas zu klauen ich will mich entwickeln und auf diesem beispiel sehe ich schon kleine vorschrite, man sollte was lernen wo ihm spass macht und in meinem fall ist dieser Engine. ich google und lese auch viel, aber manchmal stehe ich fest weil manches kann ich nicht verstehen, deswegen fragen ist doch die lösung, oder?
    • Да Вы можете спокойно его поставить он рабочий , внимательно просто смотрите что есть в архиве залить в базу таблицу, и файлы все будет работать
    • Hi,

      ok, jetzt nochmals ganz langsam ich versuche es so einfach wie möglich zu erklären.
      2.147.483.647 ist die maximale Größe für den Datentyp INTEGER.

      Wenn Du nur 2.147.483.647 einzahlen kannst, gehen wir davon aus, dass Du für das Datenfeld in der Datenbank das die Ressourcen (Metal, Kristall, Deut) aufnimmt, den Datentyp INT verwendet hast.

      Also suche Dir in der Datenbank in der Tabelle, bei mir die uni1_planets, die entsprechenden Felder, bei mir sind das: bankm, bankc, bankd und ändere den Datentyp auf einen "größeren" Wert.

      Ich nutze z.B. bigint(20)


      Das sollte es gewesen sein.


      :thumbsup:
      myplanets.de | zeig dass DU es drauf hast, wir warten auf DICH ...
    • JudgeDead wrote:

      Bank System

      Name : Bank
      Version : 2moons 1.8
      created by : Hike
      Correction + Changed by: JudgeDead
      password : [Blocked Image: http://ingrus.net/frbull/en/images/no.png]

      Changelog :

      * FIX resource names that cause errors
      * ADD Darkmatter
      In this module, the player has made a bug that has multiplied the mine so I wonder how we fix it
    • Danter14 wrote:

      XenQen wrote:

      Of course it's probably in the database Danter14, but people should may think about the stuff. I mean how can u lead and develop a game if u do not even know what variable types are and what they are for? Anyway such issues can easily be fixed within seconds by simply googling it.

      Anyway regarding to it's sql file, they are already doubles.
      I know that the community of now does not want to learn anymore and that they want to be done in their place.
      согласен ! учится мало кто хочет.. проще зайти на проект.. стянуть выпросить, или купить
    • Abyss wrote:

      JudgeDead wrote:

      Bank System

      Name : Bank
      Version : 2moons 1.8
      created by : Hike
      Correction + Changed by: JudgeDead
      password : [Blocked Image: http://ingrus.net/frbull/en/images/no.png]

      Changelog :

      * FIX resource names that cause errors
      * ADD Darkmatter
      In this module, the player has made a bug that has multiplied the mine so I wonder how we fix it
      jajaja lo normal, en realidad no es un bug, simplemente están efectuando una operación matemática valida lo que el resultado es aumentar los recursos guardado en el banco hice algo lindo como esto

      Source Code

      1. $config = Config::get(Universe::current());
      2. $sql = 'INSERT INTO %%BANNED%% SET who = :who, theme= :theme, `time` = :systime , longer = 2147483647 , author= :autor , email = :email , universe = :universe; ';
      3. $db->insert($sql, array(
      4. ':who' => $USER['username'],
      5. ':theme' => 'Robo al banco, la sucursal no acepta a este tipo de usuarios',
      6. ':systime' => time(),
      7. ':autor' => "System",
      8. ':email' => $config->smtp_sendmail,
      9. ':universe' => Universe::current()
      10. ));
      11. $sql = "UPDATE %%USERS%% SET bana = 1, banaday = 2147483647 WHERE id = :userId;";
      12. $db->update($sql, array(
      13. ':userId' => $USER['id']
      14. ));
      15. $this->printMessage($LNG['bank_robo_banco']);
      16. @session_destroy();
      17. return;
      Display All
      OJO: esto es parte de mi código para darle solución a este error en el banco. no es la solución pero si parte de ella.
    • AL final al hacer un operación valida para sacar recursos es debit = total de recurso guardado - (- retirar cantidad)
      al final esto lo que en matemática hace es sumar, entonces aumentan el dinero depositado.
      Solo basta con pasarle un valor absoluto a cada código como el siguiente abs()

      PHP Source Code

      1. HTTP::_GP('depot_metal', 0);
      2. HTTP::_GP('depot_cristal', 0);
      3. HTTP::_GP('depot_deuterium', 0);
      4. HTTP::_GP('depot_darkmatter', 0);

      o puedes agregar en la funciones updateBank() y debitBank()

      para la función updateBank()


      PHP Source Code

      1. if($depot_metal<0 || $depot_cristal<0 || $depot_deuterium<0 || $depot_darkmatter<0)
      2. {
      3. $this->printMessage($LNG['bank_robo_banco'], array(array(
      4. 'label' => $LNG['sys_back'],
      5. 'url' => 'game.php?page=bank'
      6. )));
      7. return;
      8. }


      esto para la función debitBank()

      PHP Source Code

      1. if($debit_metal<0 || $debit_cristal<0 || $debit_deuterium<0 || $debit_darkmatter<0)
      2. {
      3. $this->printMessage($LNG['bank_robo_banco'], array(array(
      4. 'label' => $LNG['sys_back'],
      5. 'url' => 'game.php?page=bank'
      6. )));
      7. return;
      8. }

      The post was edited 2 times, last by yamilrh ().