Postado Abril 24, 2020 5 anos Olá pessoal, meu script está apresentado o seguinte erro: Código que uso. function onThink(interval) if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23456)) then setGlobalStorageValue(23456, (tonumber(os.date("%d")))) db.executeQuery("UPDATE `players` SET `onlinetime7`=`onlinetime6`, `onlinetime6`=`onlinetime5`, `onlinetime5`=`onlinetime4`, `onlinetime4`=`onlinetime3`, `onlinetime3`=`onlinetime2`, `onlinetime2`=`onlinetime1`, `onlinetime1`=`onlinetimetoday`, `onlinetimetoday`=0;") db.executeQuery("UPDATE `players` SET `exphist7`=`exphist6`, `exphist6`=`exphist5`, `exphist5`=`exphist4`, `exphist4`=`exphist3`, `exphist3`=`exphist2`, `exphist2`=`exphist1`, `exphist1`=`experience`-`exphist_lastexp`, `exphist_lastexp`=`experience`;") end db.executeQuery("UPDATE `players` SET `onlinetimetoday`=`onlinetimetoday`+60, `onlinetimeall`=`onlinetimeall`+60 WHERE `online` = 1;") return true end
Postado Abril 24, 2020 5 anos 1 hora atrás, Pifafa disse: Olá pessoal, meu script está apresentado o seguinte erro: Código que uso. function onThink(interval) if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23456)) then setGlobalStorageValue(23456, (tonumber(os.date("%d")))) db.executeQuery("UPDATE `players` SET `onlinetime7`=`onlinetime6`, `onlinetime6`=`onlinetime5`, `onlinetime5`=`onlinetime4`, `onlinetime4`=`onlinetime3`, `onlinetime3`=`onlinetime2`, `onlinetime2`=`onlinetime1`, `onlinetime1`=`onlinetimetoday`, `onlinetimetoday`=0;") db.executeQuery("UPDATE `players` SET `exphist7`=`exphist6`, `exphist6`=`exphist5`, `exphist5`=`exphist4`, `exphist4`=`exphist3`, `exphist3`=`exphist2`, `exphist2`=`exphist1`, `exphist1`=`experience`-`exphist_lastexp`, `exphist_lastexp`=`experience`;") end db.executeQuery("UPDATE `players` SET `onlinetimetoday`=`onlinetimetoday`+60, `onlinetimeall`=`onlinetimeall`+60 WHERE `online` = 1;") return true end Parece que o valor que a exp ta recebendo está fora do range (que é o limite) tipo ta recebendo 99999999 e tem espaço pra 500 mil
Postado Abril 25, 2020 5 anos Autor Em 24/04/2020 em 11:53, BrazItzMe disse: Parece que o valor que a exp ta recebendo está fora do range (que é o limite) tipo ta recebendo 99999999 e tem espaço pra 500 mil Exatamente, fazendo que a pagina sai fora do ar, não estou conseguindo arruma esse bug.
Postado Abril 27, 2020 5 anos Autor erro que aparece ao liga servidor! mysql_real_query(): UPDATE `players` SET `exphist7`=players.exphist6, `exphist6`=players.exphist5, `exphist5`=players.exphist4, `exphist4`=players.exphist3, `exphist3`=players.exphist2, `exphist2`=players.exphist1, `exphist1`=players.experience-players.exphist_lastexp, `exphist_lastexp`=players.experience; - MYSQL ERROR: BIGINT UNSIGNED value is out of range in '`ot`.`players`.`experience` - `ot`.`players`.`exphist_lastexp`' (1690)
Postado Maio 2, 2020 5 anos Tenta assim meu lindo function onThink(interval) if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23456)) then setGlobalStorageValue(23456, (tonumber(os.date("%d")))) db.executeQuery("UPDATE `players` SET `onlinetime7`=`onlinetime6`, `onlinetime6`=`onlinetime5`, `onlinetime5`=`onlinetime4`, `onlinetime4`=`onlinetime3`, `onlinetime3`=`onlinetime2`, `onlinetime2`=`onlinetime1`, `onlinetime1`=`onlinetimetoday`, `onlinetimetoday`=0;") db.executeQuery("UPDATE `players` SET `exphist7`=`exphist6`, `exphist6`=`exphist5`, `exphist5`=`exphist4`, `exphist4`=`exphist3`, `exphist3`=`exphist2`, `exphist2`=`exphist1`, `exphist1`=`experience`-`exphist_lastexp`, `exphist_lastexp`=`experience` AS UNSIGNED;") end db.executeQuery("UPDATE `players` SET `onlinetimetoday`=`onlinetimetoday`+60, `onlinetimeall`=`onlinetimeall`+60 WHERE `online` = 1;") return true end Ou executa este comando: SET sql_mode = 'NO_UNSIGNED_SUBTRACTION'; Não sei se vai funcionar mas de qualquer maneira, o valor que ele irá buscar será muito alto... Algo em torno de 9.223.372.036.875.770.123 Editado Maio 2, 2020 5 anos por 9k22 (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.