Prevent deleting all the toons

04/11/2017 10:34 [GM]LibertyBelle#1
Anyone can point out how to prevent user to delete all toons in the account?
There should be 1 toon left and cannot be deleted.
04/11/2017 19:35 HellRevenger#2
it that really necessary?
what if someone wants to change faction?
06/10/2017 14:48 [GM]LibertyBelle#3
Yes, I want to prevent deleting all the toons in 1 faction and choose another faction.
I want to keep 1 toon always and can't be deleted.
In [usp_Delete_Char_E]
I have this:
DECLARE @[Only registered and activated users can see links. Click Here To Register...]ons int
DECLARE @[Only registered and activated users can see links. Click Here To Register...]UID int

SET @[Only registered and activated users can see links. Click Here To Register...]UID = (select UserUID from Chars where CharID = @[Only registered and activated users can see links. Click Here To Register...]D)
SET @[Only registered and activated users can see links. Click Here To Register...]ons = (select Count(*) from Chars where Del = 0 AND UserUID = @[Only registered and activated users can see links. Click Here To Register...]UID)


IF @[Only registered and activated users can see links. Click Here To Register...]ons < 2
BEGIN
RETURN -1 (Currently this will exit the game, I want to create an error box saying "You can't delete your last toon")
END
Anyone can point me to the right direction?
06/21/2017 19:52 [GM]Sodawa#4
DECLARE @[Only registered and activated users can see links. Click Here To Register...]ons int
DECLARE @[Only registered and activated users can see links. Click Here To Register...]UID int

SET @[Only registered and activated users can see links. Click Here To Register...]UID = (select UserUID from Chars where CharID = @[Only registered and activated users can see links. Click Here To Register...]D)
SET @[Only registered and activated users can see links. Click Here To Register...]ons = (select Count(*) from Chars where Del = 0 AND UserUID = @[Only registered and activated users can see links. Click Here To Register...]UID)


IF @[Only registered and activated users can see links. Click Here To Register...]ons < 2
BEGIN
SET [Status] = -10
END

Then just modify your sysmsg-uni.txt and write what you want with the right status.