• 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!

killstatistics

bleeblahblork

New Member
Joined
Aug 12, 2009
Messages
117
Reaction score
0
My killstatistics doesn't work on my website.

Anyone have any ideas on why?

I believe that im missing something within my database.
 
Last edited:
Well, my problem started like this

I have a 0.3.4 server.

Tried to update it to 0.3.5, and it didnt work.

So I reverted back to 0.3.4, and now I have to use the 0.3.5 Gesior to have my account page. Everything works except for the last kills/deathlist.

I believe I am missing fields in my database.

My player_deaths has

Field Type Attributes Null Default Extra Action
id int(11) No auto_increment
player_id int(11) No
date bigint(20) UNSIGNED No
level int(10) UNSIGNED No
time int(11) UNSIGNED No

Im pretty sure im missing columns, but Im not sure which ones.
 
Well, the 0.3.4 and 0.3.5 versions are saving deaths in different ways. If you use the Gesior AAC for 0.3.4 instead, it'll be working just fine.
 
I believe this is the structure for 0.3.4 player_deaths.
Code:
CREATE TABLE IF NOT EXISTS `player_deaths` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `player_id` int(11) NOT NULL,
  `time` bigint(20) unsigned NOT NULL DEFAULT '0',
  `level` int(11) NOT NULL DEFAULT '1',
  `killed_by` varchar(255) NOT NULL COMMENT 'last hit killer',
  `altkilled_by` varchar(255) NOT NULL COMMENT 'most damage killer',
  PRIMARY KEY (`id`),
  KEY `player_id` (`player_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;

ALTER TABLE `player_deaths`
  ADD CONSTRAINT `player_deaths_ibfk_1` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;
 
Ok that worked, but now I have this:

1.
10.10.2009, 11:57:56 Argio killed at level 81 by DELETED PLAYER. A-World-Unknown
2.
10.10.2009, 11:21:18 Demon Blood killed at level 50 by DELETED PLAYER. A-World-Unknown
3.
10.10.2009, 4:36:34 Snowflake killed at level 87 by DELETED PLAYER. A-World-Unknown
4.
10.10.2009, 3:09:55 Anpom killed at level 121 by Paladinyer. A-World-Unknown
5.
10.10.2009, 3:03:43 Argio killed at level 80 by DELETED PLAYER. A-World-Unknown
6.
10.10.2009, 2:27:14 Moon Duck killed at level 95 by Marin Hot. A-World-Unknown
7.
10.10.2009, 1:57:57 Divlyn killed at level 177 by Meganyer. A-World-Unknown
8.
10.10.2009, 1:49:49 Carios killed at level 57 by Anpom. A-World-Unknown
9.
10.10.2009, 1:35:54 Yourdaddy killed at level 108 by Anpom and Pallu. A-World-Unknown
10.
10.10.2009, 1:22:39 Shippz killed at level 57 by DELETED PLAYER. A-World-Unknown
11.
10.10.2009, 1:17:24 Sulazoh killed at level 47 by DELETED PLAYER. A-World-Unknown
12.
10.10.2009, 1:12:50 Marin Hot killed at level 144 by DELETED PLAYER. A-World-Unknown
13.
10.10.2009, 0:49:18 Carios killed at level 24 by DELETED PLAYER. A-World-Unknown
14.
10.10.2009, 0:18:39 Mune killed at level 24 by DELETED PLAYER. A-World-Unknown
15.
9.10.2009, 23:24:06 Zhatanik killed at level 81 by DELETED PLAYER.

So, the killed by a player works, but the killed by a monster doesn't
 
I also now get this.

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\characters.php on line 236

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'player_deaths.id' in 'field list'' in C:\xampp\htdocs\characters.php:258 Stack trace: #0 C:\xampp\htdocs\characters.php(258): PDO->query('SELECT `player_...') #1 C:\xampp\htdocs\index.php(154): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\characters.php on line 258

Which is:
$players_deaths = $SQL->query('SELECT `player_deaths`.`id`, `player_deaths`.`date`, `player_deaths`.`level` FROM `player_deaths` WHERE `player_deaths`.`player_id` = '.$idgracza.' ORDER BY `date` DESC LIMIT 50');
 
Back
Top Bottom