View Full Version : DB change error 1062
Disorder
02-01-2013, 08:08 PM
Attempting to use command prompt to edit a database table column. I entered this -
UPDATE char_create_combinations SET start_zone = 58;
The result is Error 1062 <23000>: Duplicate Entry '1-1-396-58' for key 'PRIMARY'
This just a syntax error or am I way off track?
Thanks in advance!
c0ncrete
02-01-2013, 08:28 PM
which record are you trying to set the start_zone to 58 on? all of them?
Zamthos
02-01-2013, 08:54 PM
This happens because there are multiple entries for the same class and race, due to multiple deities, I've tried this as well, never found a work around, but if you set it for the majority, most people will start in the start, you could disable all deities except for one if necessary.
c0ncrete
02-01-2013, 09:05 PM
you could use a script to move everyone to the zone you want them to start in as a work around. it's not an ideal solution, because they'd zone twice when they first enter the world, but then you could bind them.
Disorder
02-01-2013, 10:31 PM
c0ncrete,
Aye, I was trying to edit the char_create_combinations tables. Wanting to ensure all people start in zone 58. Could a script be used to catch the ones that fall through the cracks instead of being the default? I could set all to 58 except duplicates, and then set the few odd balls to zone_B - and make the script just on zone_B.. say the tutorial zone.
Thanks!
c0ncrete
02-01-2013, 10:36 PM
yeah. that'd work. just use the global player script in templates to check for a gqglobal that you set the first time anyone logs in. if the qgloabl isn't set and they're in another zone, move them, bind them, and set a permanent qglobal so it doesn't ever move them again. you'd want to set the qglobal for everyone else when they first log in as well, there would just be no need to move them.
Disorder
02-01-2013, 11:04 PM
Interesting, I've never worked with qglobal. I'll have to try and figure this out.
Thanks!
arcerean
02-02-2013, 01:14 AM
you can change the start zone in variables also, make entry StartZone then zone short name, For zone 58 would be varname-Startzone, value- crushbone
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.