Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

sqlite, problem


pan ktosik

Rekomendowane odpowiedzi

Opublikowano

error:

[19:28:20 WARN]: [Core] Wystapil blad podczas zapytania o 'INSERT INTO `
core-users`(`id`, `name`, `points`, `kills`, `deaths`, `assists`, `logouts`, `gr
oup`, `firstIP`, `lastIP`, `firstJoin`, `lastKill`, `lastKillTime`, `god`, `mone
ty`) VALUES (NULL, 'JakisTypek2018','1000','0','0','0','0','PLAYER','127.0.0.1','127
.0.0.1','1505410099923','-','0','0','0');'!
[19:28:20 WARN]: [Core] Error: table core-users has no column named monety
[19:28:20 WARN]: java.sql.SQLException: table core-users has no column named monety
[19:28:20 WARN]:        at org.sqlite.NativeDB.throwex(NativeDB.java:210)
[19:28:20 WARN]:        at org.sqlite.NativeDB._exec(Native Method)
[19:28:20 WARN]:        at org.sqlite.Stmt.executeUpdate(Stmt.java:152)
[19:28:20 WARN]:        at net.core.storage.modes.sqlite.StoreSQLITE$
1.run(StoreSQLITE.java:62)
[19:28:20 WARN]:        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unk
nown Source)
[19:28:20 WARN]:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Un
known Source)
[19:28:20 WARN]:        at java.lang.Thread.run(Unknown Source)

kod:

    private void insert() {
        CorePlugin.getStore().update(false, "INSERT INTO `{P}users`(`id`, `name`, `points`, `kills`, `deaths`, `assists`, `logouts`, `group`, `firstIP`, `lastIP`, `firstJoin`, `lastKill`, `lastKillTime`, `god`, `monety`) VALUES (NULL, '" + this.getName() + "','" + this.getPoints() + "','" + this.getKills() + "','" + this.getDeaths() + "','" + this.getAssists() + "','" + this.getLogouts() + "','" + this.getGroup() + "','" + this.getFirstIP() + "','" + this.getLastIP() + "','" + this.getFirstJoin() + "','" + this.getLastKill() + "','" + this.getLastKillTime() + "','" + (this.isGod() ? 1 : 0) + "','" + this.getMonety() + "');");
    }
    
    public void save() {
        CorePlugin.getStore().update(false, "UPDATE `{P}users` SET `points` = '" + this.getPoints() + "', `kills` = '" + this.getKills() + "', `deaths` = '" + this.getDeaths() + "', `assists` = '" + this.getAssists() + "', `logouts` = '" + this.getLogouts() + "', `group` = '" + this.getGroup() + "', `firstIP` = '" + this.getFirstIP() + "', `lastIP` =' " + this.getLastIP() + "', `firstJoin` = '" + this.getFirstJoin() + "', `lastKill` = '" + this.getLastKill() + "', `lastKillTime` = '" + this.getLastKillTime() + "', `god` = '" + (this.isGod() ? 1 : 0) + "', `monety` = '" + this.getMonety() + "' WHERE `name` ='" + this.getName() + "';");
    }

zbytnio nie ogarniam mysql, ktos cos pomoze?

Opublikowano

no czytaj komunikaty 

[19:28:20 WARN]: [Core] Error: table core-users has no column named monety
[19:28:20 WARN]: java.sql.SQLException: table core-users has no column named monety

nie masz kolumny monety

 

 

 

 

fKJeAI4.jpg

 

 

 

Opublikowano
1 minutę temu, Nocny napisał:

no czytaj komunikaty 


[19:28:20 WARN]: [Core] Error: table core-users has no column named monety
[19:28:20 WARN]: java.sql.SQLException: table core-users has no column named monety

nie masz kolumny monety

tak, bo wcale tego nie przeczytalem..

 

przeciez dalem kod, nie mozesz powiedziec co jest zle?

Opublikowano
18 godzin temu, MarcinWieczorek napisał:

Struktura jest źle. Pokaż nam ją.

co to struktura?

to nie mój plugin, dodałem sobie tylko jeden field który chce zapisywać.

Opublikowano

plugin erniaa, core.

przejrzałem kod, w klasie CorePlugin (głowna), na dole tworzysz kolumny, dodaj tam 'monety'.

 

Aktualnie interesuję się javą, powoli ogarniam java swing i awt, czasem bawię się HTML.

Opublikowano
Dnia 15.09.2017 o 17:10, ˈyøøniks napisał:

plugin erniaa, core.

przejrzałem kod, w klasie CorePlugin (głowna), na dole tworzysz kolumny, dodaj tam 'monety'.

Znalazłem, dzieki.

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...