• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Mysql problem

stanczyk

Scripter
Joined
Nov 24, 2009
Messages
293
Reaction score
2
Siema, pobrałem serwer materii i mam problem tylko przy rush event gdy jest on włączony w modach wyrzuca błąd z bazy i postać nie zapisuje swoich osiągnięć, może ktoś wcześniej miał ten sam problem i jest w stanie mi pomóc go rozwiązać byłym wdzięczny.

Błędy z systemu występują przy wylogowaniu postaci i save:

Code:
mysql_real_query(): INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES (2, '0', ''),(2, '1310000', '1'),(2, '1310600', '4'),(2, '1311800', '1'),(2, '811241', '1'),(2, 'rushEventPlayer', '') - MYSQL ERROR: Duplicate entry '2-0' for key 'player_id_2' (1062)
[9/12/2013 19:50:40] mysql_real_query(): INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES (2, '0', ''),(2, '1310000', '1'),(2, '1310600', '4'),(2, '1311800', '1'),(2, '811241', '1'),(2, 'rushEventPlayer', '') - MYSQL ERROR: Duplicate entry '2-0' for key 'player_id_2' (1062)
[9/12/2013 19:50:40] mysql_real_query(): INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES (2, '0', ''),(2, '1310000', '1'),(2, '1310600', '4'),(2, '1311800', '1'),(2, '811241', '1'),(2, 'rushEventPlayer', '') - MYSQL ERROR: Duplicate entry '2-0' for key 'player_id_2' (1062)

Code:
mysql_real_query(): INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES (2, '0', ''),(2, '1310000', '1'),(2, '1310600', '4'),(2, '1311800', '1'),(2, '811241', '1'),(2, 'rushEventPlayer', '') - MYSQL ERROR: Duplicate entry '2-0' for key 'player_id_2' (1062)

Code:
mysql_real_query(): INSERT INTO `global_storage` (`key`, `world_id`, `value`) VALUES ('100014', 0, '-1'),('100015', 0, '-1'),('100018', 0, '0'),('123661', 0, '0'),('1236610', 0, '0'),('1236612', 0, '0'),('123662', 0, '0'),('123663', 0, '0'),('123664', 0, '0'),('123665', 0, '0'),('123666', 0, '0'),('123667', 0, '0'),('123668', 0, '0'),('20001', 0, '-1'),('20003', 0, '-1'),('20005', 0, '-1'),('20007', 0, '-1'),('20009', 0, '-1'),('435773', 0, '-1'),('44533', 0, '0'),('44535', 0, '10000'),('44536', 0, '0'),('44538', 0, '10000'),('44539', 0, '0'),('44540', 0, '-1'),('44541', 0, '-1'),('457866', 0, '-1'),('51836', 0, '-1'),('782346', 0, '0'),('7858', 0, '0'),('fireStormEventJoining', 0, '-1'),('fireStormEventMain', 0, '-1'),('lmsEventJoining', 0, '-1'),('lmsEventMain', 0, '-1'),('pandoraBoxEventMain', 0, '-1'),('pandoraBoxEventTime', 0, '0'),('runEventJoining', 0, '-1'),('rushEventBlueScore', 0, '0'),('rushEventJoining', 0, '-1'),('rushEventMain', 0, '-1'),('rushEventRedScore', 0, '0'),('zombieEventJoining', 0, '-1'),('zombieEventMain', 0, '-1') - MYSQL ERROR: Duplicate entry '0-0' for key 'key' (1062)
 
Nie posiadasz odpowiedniej tabeli w bazie danych, (nie ma gdzie dodać niektórych parametrów) Z tego co pamiętam..... Dodaj do bazy:
CREATE TABLE `events` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`event_name` varchar(255) NOT NULL,
`winner_name` varchar(255) NOT NULL,
`won_item` varchar(255) NOT NULL,
`time_win` int(7) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=45 ;
 
Nie posiadasz odpowiedniej tabeli w bazie danych, (nie ma gdzie dodać niektórych parametrów) Z tego co pamiętam..... Dodaj do bazy:
no raczej nie, przeczytaj co sypie mysql, duplicate entry... i to dla tabeli player_storage a nie jakies events
 
ja ostatnio miałem dziwny problem z samplami ... ktos robił chara to losowo dostawał itemy czasami trafiały się itemy ze sklepu... nadal nie wiem co się stało jakoś te sample naprawiłem ;p jeśli ktoś ma jakiś pomysł to śmiało co mogło się stać?:)
 
wszystkie sorage trzeba zamienić na liczby.
Code:
 storages = {
                                        main = 'rushEventMain', -- set free storage
                                        player = 'rushEventPlayer', -- set free storage
                                        joining = 'rushEventJoining', -- set free storage
                                        b_score = 'rushEventBlueScore', -- set free storage
                                        r_score = 'rushEventRedScore', -- set free storage
                                        exhaust = 'rushEventExhaust',
                                        countEvent = 'rushEventCountEvent'
                                },
na
Code:
 storages = {
                                        main = '1234', -- set free storage
                                        player = '12345', -- set free storage
                                        joining = '12346', -- set free storage
                                        b_score = '12347', -- set free storage
                                        r_score = '12348', -- set free storage
                                        exhaust = '12349',
                                        countEvent = '12310'
                                },
Musi działać w 100%
 
Subzero, usunęło to część problemu ale został jeszcze jeden error przy ''zapisywaniu serwera /save, etc."

Code:
mysql_real_query(): INSERT INTO `global_storage` (`key`, `world_id`, `value`) VALUES ('100014', 0, '-1'),('100015', 0, '-1'),('100018', 0, '0'),('1234', 0, '-1'),('12346', 0, '-1'),('12347', 0, '0'),('12348', 0, '0'),('123661', 0, '0'),('1236610', 0, '0'),('1236612', 0, '0'),('123662', 0, '0'),('123663', 0, '0'),('123664', 0, '0'),('123665', 0, '0'),('123666', 0, '0'),('123667', 0, '0'),('123668', 0, '0'),('20001', 0, '-1'),('20003', 0, '-1'),('20005', 0, '-1'),('20007', 0, '-1'),('20009', 0, '-1'),('435773', 0, '-1'),('44533', 0, '0'),('44535', 0, '10000'),('44536', 0, '0'),('44538', 0, '10000'),('44539', 0, '0'),('44540', 0, '-1'),('44541', 0, '-1'),('457866', 0, '-1'),('51836', 0, '-1'),('782346', 0, '0'),('7858', 0, '0'),('fireStormEventJoining', 0, '-1'),('fireStormEventMain', 0, '-1'),('lmsEventJoining', 0, '-1'),('lmsEventMain', 0, '-1'),('pandoraBoxEventMain', 0, '-1'),('pandoraBoxEventTime', 0, '0'),('runEventJoining', 0, '-1'),('zombieEventJoining', 0, '-1'),('zombieEventMain', 0, '-1') - MYSQL ERROR: Duplicate entry '0-0' for key 'key' (1062)
 
a to juz chyba jakis inny event z tym samym problemem czyli klucze sa typu string a baza moze przechowywac tylko int
 
Back
Top