BattleMaster Community

Toms Other Games => SpellMaster III => SM General Discussion => Topic started by: Nathan on October 23, 2011, 10:44:44 PM

Title: Delete spell error
Post by: Nathan on October 23, 2011, 10:44:44 PM
When I click "give up and delete spell", I'm taken to an error page that says:

PDOException [ 23000 ]: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`SM3`.`characters_spells`, CONSTRAINT `characters_spells_ibfk_2` FOREIGN KEY (`spell_id`) REFERENCES `Spells` (`id`))
Title: Re: Delete spell error
Post by: Morningstar on October 24, 2011, 03:45:57 AM
When I click "give up and delete spell", I'm taken to an error page that says:

Quitter.  :P

Ok but seriously, I can't verify one way or the other. Don't have any spells pending on my end.
Title: Re: Delete spell error
Post by: Indirik on October 24, 2011, 03:55:30 PM
It worked for me. I just deleted a spell that had been rejected.
Title: Re: Delete spell error
Post by: Nathan on October 24, 2011, 04:43:17 PM
It worked for me. I just deleted a spell that had been rejected.

I'm still getting the error.
Title: Re: Delete spell error
Post by: Anarki_Hunter on October 24, 2011, 04:47:23 PM
I cannot see the 'Delete' spell option!, I am a normal generic user to SM3 and use a chrome browser (is this the attributing factor!).

-Edit-

Also, 2 of the 3 spells which were awaiting approval had disappeared a few days ago without any notification!.
Title: Re: Delete spell error
Post by: Indirik on October 24, 2011, 05:22:59 PM
I believe that when you submit a spell and it is rejected, you will get the option to delete it. Once a spell has been approved it is "in the system", and you lose control over it.

You can't delete spells from your spell list. These are the ones you have learned, and your character can use.

Also, 2 of the 3 spells which were awaiting approval had disappeared a few days ago without any notification!.
This means that a GM approved them for use. You may or may not have been granted one or more them for your own use.
Title: Re: Delete spell error
Post by: Tom on October 24, 2011, 07:12:52 PM
you're trying to delete a spell that someone has already learnt?
Title: Re: Delete spell error
Post by: Nathan on October 24, 2011, 07:35:12 PM
you're trying to delete a spell that someone has already learnt?

Nope. However there is a spell with the same name (if discounting capitalisation). The existing one is "Cauterize Wound" (spell 32), whereas mine is "Cauterize wound" (spell 413).
Title: Re: Delete spell error
Post by: Tom on October 24, 2011, 10:49:48 PM
name doesn't matter to the database. :-)

It must be. Somehow, someone must've learnt it, because that's what the thing is complaining about.

Title: Re: Delete spell error
Post by: Nathan on October 25, 2011, 12:45:35 AM
Somehow, someone must've learnt it, because that's what the thing is complaining about.

I thought that was impossible if the spell hadn't been approved yet?

Are you able to check if a certain spell has been learned by anyone?
Title: Re: Delete spell error
Post by: Tom on October 26, 2011, 11:54:20 AM
yeah, I can do that. But for consistency, I should really update the code so that it removes the spell from characters as well - it might be an admin deleting the spell, after all.