Vote end buff

    
  1. Atsijungęs

    teampages

    Pranešimai: 0

    Sveiki taigi meta duomenu bases error su "vote_end_buff", as irasiau blogai nes turetu kaskaip kitaip buti, pagal errora sprendziu.
    sitaip irases i sql "characters".

    `vote_end_buff` int(1) DEFAULT '0',

    zinau kad netaip reike, bet kaip tai nzn, galit pasakyti prasau jusu. :)
    Pats erroras:
    com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'vote_end_buff' at row 1
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4188)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4122)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2818)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2157)
    at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1379)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:378)
    at com.l2jfresh.gameserver.model.actor.instance.L2VoteManagerInstance.setBuff(L2VoteManagerInstance.java:175)
    at com.l2jfresh.gameserver.model.actor.instance.L2VoteManagerInstance.onBypassFeedback(L2VoteManagerInstance.java:55)
    at com.l2jfresh.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:937)
    at com.l2jfresh.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:65)
    at com.l2jfresh.gameserver.network.L2GameClient.run(L2GameClient.java:806)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    could not set buff on char:
    Data truncation: Out of range value for column 'vote_end_buff' at row

    o sitaip source yrasytas:
    player.setVoteBuff(rset.getInt("votebuff") == 1 ? true : false);
    player.setVoteBuffEndTime(rset.getLong("vote_end_buff"));


    3 Gruodžio 2015 - 21:43 / #1
  2. 
  3. Atsijungęs

    teampages

    Pranešimai: 0

    PreparedStatement statement = con.prepareStatement("UPDATE characters SET votebuff=?, vote_end_buff=? WHERE obj_id=?");
    statement.setInt(1, 1);
    statement.setLong(2, _player.getVoteBuffEndTime());
    statement.setInt(3, _player.getObjectId());
    statement.execute();
    statement.close();
    3 Gruodžio 2015 - 22:40 / #2
  4. 
  5. Atsijungęs

    wewewe

    Pavadinimas: L2 žaidėjas

    Narys

    Pranešimai: 727

    Vartotojo apdovanojimai: 16

    `vote_end_buff` int(1) DEFAULT '0',

    laukelio tipas int, jame gali buti saugomos reiksmes nuo -2147483648 iki 2147483647 arba nuo 0 iki 4294967295 jei unsigned.
    Taip raso cia: http://dev.mysql.com/doc/refman/5.7/en/integer-types.html

    Out of range value for column 'vote_end_buff'

    Erroras sako, kad tu i ta laukeli bandai sukisti didesne reiksme. Itariu _player.getVoteBuffEndTime() grazina kazka panasaus i System.currentTimeMillis() + kazkiek. Jei taip, tai rezultatas bus panasus i 1449176599570. Kaip matom cia yra gerokai daugiau nei 2 ar 4 milijardai.

    So yeah, fixas butu saugoti (System.currentTimeMillis() + kazkiek)/1000 tik pasiredaguok ir kitur koda, kad i tai atsizvelgtu. Arba pakeisk laukelio tipa i bigint.
    3 Gruodžio 2015 - 23:11 / #3
  6. 
  7. Atsijungęs

    teampages

    Pranešimai: 0

    Aciu kad padejai :)
    4 Gruodžio 2015 - 01:24 / #4