Jump to content
  • 0

[SQL]: DB error - Duplicate entry '1' for key 'PRIMARY'


Question

Posted (edited)
[SQL]: DB error - Duplicate entry '1' for key 'PRIMARY'
[Debug]: at h:\dxro\rathena\src\map\script.cpp:16633 - INSERT `zzz_game` VALUES(1,2000001,150003)
[Debug]: Source (NPC): Kill Me at arena_room (97,100)
[SQL]: DB error - Duplicate entry '1' for key 'PRIMARY'
[Debug]: at h:\dxro\rathena\src\map\script.cpp:16633 - UPDATE `zzz_game` SET `id` = 1 WHERE `account_id` = 2000001 AND `char_id` = 150003
[Debug]: Source (NPC): Kill Me at arena_room (97,100)
[Error]: buildin_sleep2: no unit is attached
[Debug]: Source (NPC): Kill Me at arena_room (97,100)
[SQL]: DB error - Duplicate entry '1' for key 'PRIMARY'

Hi,

Im getting this error. I dunno what to do. Please help

This is from an old script that I ordered long ago, I'm trying to revive it as much as I can.

Edited by pajodex

3 answers to this question

Recommended Posts

  • 0
Posted
CREATE TABLE IF NOT EXISTS `zzz_game` (
  `id` int(11) NOT NULL auto_increment,
  `account_id` int(11) NOT NULL default '0',
  `char_id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`account_id`)
) ENGINE=MyISAM;

Already did that. Or didn't I?

  • 0
Posted

The script is trying to insert the value "1" in a column labelled as a primary key, so you can't re-insert nor update that value. You script need fixing.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...