Lottery Mod 1.8

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

    • Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%%LOTTERIA%% WHERE uni = '1'' at line 1

      Query-Code:SELECT DISTINCT id FROM %%LOTTERIA%% WHERE uni = 1;
      File: /includes/classes/Database.class.php
      Line: 126
      URL: localhost/xnova/game.php?page=lottery
      PHP-Version: 7.2.0
      PHP-API: apache2handler
      2Moons Version: 1.8.git
      Debug Backtrace:
      #0 /includes/classes/Database.class.php(193): Database->_query('SELECT DISTINCT...', Array, 'select')
      #1 /includes/pages/game/ShowLotteryPage.class.php(85): Database->select('SELECT DISTINCT...', Array)
      #2 /game.php(57): ShowLotteryPage->show()
      #3 {main}
    • tellez wrote:

      Como debo ponerlo en dtables.db????
      Agrega en el archivo dbtables.php
      'LOTTERIA'=> DB_PREFIX.'loteria',
      'LOTTERIALOG'=> DB_PREFIX.'loteria_log',
      'LOTTERIAAM'=> DB_PREFIX.'loteriaam',
      'LOTTERIAAMLOG'=> DB_PREFIX.'loteriaam_log',
      VERY SAD :/ :/ :/ :/
    • yamilrh wrote:

      tellez wrote:

      Como debo ponerlo en dtables.db????
      Agrega en el archivo dbtables.php'LOTTERIA'=> DB_PREFIX.'loteria',
      'LOTTERIALOG'=> DB_PREFIX.'loteria_log',
      'LOTTERIAAM'=> DB_PREFIX.'loteriaam',
      'LOTTERIAAMLOG'=> DB_PREFIX.'loteriaam_log',
      Gracias me funcionó pero ahora me arrojó otro error cuando fui a comprar el tikets

      Message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'ID'

      Query-Code:INSERT INTO uni1_loteria SET ID = 1, user = admin, tickets = 1, uni = 1;
      File: /includes/classes/Database.class.php
      Line: 126
      URL: localhost/xnova/game.php?page=lottery
      PHP-Version: 7.2.0
      PHP-API: apache2handler
      2Moons Version: 1.8.git
      Debug Backtrace:
      #0 /includes/classes/Database.class.php(185): Database->_query('INSERT INTO uni...', Array, 'insert')
      #1 /includes/pages/game/ShowLotteryPage.class.php(76): Database->insert('INSERT INTO %%L...', Array)
      #2 /game.php(57): ShowLotteryPage->show()
      #3 {main}
    • tellez wrote:

      yamilrh wrote:

      tellez wrote:

      Como debo ponerlo en dtables.db????
      Agrega en el archivo dbtables.php'LOTTERIA'=> DB_PREFIX.'loteria','LOTTERIALOG'=> DB_PREFIX.'loteria_log',
      'LOTTERIAAM'=> DB_PREFIX.'loteriaam',
      'LOTTERIAAMLOG'=> DB_PREFIX.'loteriaam_log',
      Gracias me funcionó pero ahora me arrojó otro error cuando fui a comprar el tikets
      Message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'ID'

      Query-Code:INSERT INTO uni1_loteria SET ID = 1, user = admin, tickets = 1, uni = 1;
      File: /includes/classes/Database.class.php
      Line: 126
      URL: localhost/xnova/game.php?page=lottery
      PHP-Version: 7.2.0
      PHP-API: apache2handler
      2Moons Version: 1.8.git
      Debug Backtrace:
      #0 /includes/classes/Database.class.php(185): Database->_query('INSERT INTO uni...', Array, 'insert')
      #1 /includes/pages/game/ShowLotteryPage.class.php(76): Database->insert('INSERT INTO %%L...', Array)
      #2 /game.php(57): ShowLotteryPage->show()
      #3 {main}
      Supongo que sea normal, intentaste insertar el mismo ID de lotería por lo que es un campo único, borra cache e intenta comprar un ticket nuevamente. Ya no debería darte error
      VERY SAD :/ :/ :/ :/
    • yamilrh wrote:

      tellez wrote:

      yamilrh wrote:

      tellez wrote:

      Como debo ponerlo en dtables.db????
      Agrega en el archivo dbtables.php'LOTTERIA'=> DB_PREFIX.'loteria','LOTTERIALOG'=> DB_PREFIX.'loteria_log','LOTTERIAAM'=> DB_PREFIX.'loteriaam',
      'LOTTERIAAMLOG'=> DB_PREFIX.'loteriaam_log',
      Gracias me funcionó pero ahora me arrojó otro error cuando fui a comprar el tiketsMessage: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'ID'

      Query-Code:INSERT INTO uni1_loteria SET ID = 1, user = admin, tickets = 1, uni = 1;
      File: /includes/classes/Database.class.php
      Line: 126
      URL: localhost/xnova/game.php?page=lottery
      PHP-Version: 7.2.0
      PHP-API: apache2handler
      2Moons Version: 1.8.git
      Debug Backtrace:
      #0 /includes/classes/Database.class.php(185): Database->_query('INSERT INTO uni...', Array, 'insert')
      #1 /includes/pages/game/ShowLotteryPage.class.php(76): Database->insert('INSERT INTO %%L...', Array)
      #2 /game.php(57): ShowLotteryPage->show()
      #3 {main}
      Supongo que sea normal, intentaste insertar el mismo ID de lotería por lo que es un campo único, borra cache e intenta comprar un ticket nuevamente. Ya no debería darte error
      Listo no me da error. Ahora el error es que uno mismo no puedo comprar 2 tikets y no deberia arrojar error. Debería decir algo como: Solo se permite la compra de 1 Tikets por usuario.
    • tellez wrote:

      Listo no me da error. Ahora el error es que uno mismo no puedo comprar 2 tikets y no deberia arrojar error. Debería decir algo como: Solo se permite la compra de 1 Tikets por usuario.
      then the limit is made by this $max_users_tickets = 10; but according to the code the verification is not good so normal that you have an error and in addition it is a big mess this source code