- Joined
- Jul 1, 2004
- Messages
- 13
- Reaction score
- 0
This Fix "Item Sharing", this only occurs when a character is deleted.
And "New Character Missing", this also occurs when a character is deleted (e.g when you delete you first character).
SOLUTION:
Goto Character Database edit the Database. change CID to Identity, leave other things to default. Look at the "0" on the old spInsertChar, then assign a default value to 0 on all column that has a value of 0 on the old spInsertChar. And then save .
then apply this:
This is not the complete code that has all the items on your inventory and equipped on the same time. There is a post for that fix. You can add custom code below the line "Values"
HOPE this help guys! and credits goes to me for the fix
Sorry if i'm not to clear on my explanation. Hope you understand.
And "New Character Missing", this also occurs when a character is deleted (e.g when you delete you first character).
ALTER PROCEDURE [dbo].[spInsertChar]
@nAID INT,
@nCharIndex INT,
@szName nvarchar(32),
@nSex INT,
@nHair INT,
@nFace INT,
@nCostume INT
AS
BEGIN
SET NOCOUNT ON;
DECLARE @cnt INT <--- cause of "New Character Missing"
SELECT @cnt=COUNT(*)(e.g First Character has CharNum of 0, 2nd character is 1 and so on.
FROM Character When you delete for example you 1st character this code counts you characters again
WHERE AID = @nAIDbut now you have 2 characters aleady so @cnt=COUNT(*) will be equal to 2 so
"New Character Missing" occurs here for there is already a character assigned to CharNum=1,thus this duplicate CharNum=1 and you cant see the new character
DECLARE @cid INT <--- cause of "Item Sharing"
SELECT @cid=COUNT(*) same problem as above (NOTE: @cid=COUNT(*) counts all characters,
FROM Characterlets assume there are 30 characters so the last character has A CID of 29.)
But this time when you delete a character, for example a character that has a CID of 10, @cid=COUNT(*) counts all character in the database and there are 29 characters so @cid=COUNT(*) will be equal to 29 now and "CID duplication" occurs which leads to "Item Sharing" for the same CID is use.
INSERT INTO Character
VALUES(@nAID,@szName,@cnt,1,@nSex,@nCostume,@nFace,@nHair,NULL,0,'1,000',0,0,0,0,0,0,0,0,0,0,0,0,@cnt,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,getdate(),getdate(),0)
SOLUTION:
Goto Character Database edit the Database. change CID to Identity, leave other things to default. Look at the "0" on the old spInsertChar, then assign a default value to 0 on all column that has a value of 0 on the old spInsertChar. And then save .
then apply this:
CREATE PROCEDURE [dbo].[spInsertChar]
@nAID INT,
@nCharIndex INT,
@szName nvarchar(32),
@nSex INT,
@nHair INT,
@nFace INT,
@nCostume INT
AS
BEGIN
SET NOCOUNT ON;
INSERT Character (AID,Name,CharIndex,Sex,Costume,Face,Hair,CharNum)
VALUES (@nAID,@szName,@nCharIndex,@nSex,@nCostume,@nFace,@nHair,@nCharIndex)
END
This is not the complete code that has all the items on your inventory and equipped on the same time. There is a post for that fix. You can add custom code below the line "Values"
HOPE this help guys! and credits goes to me for the fix
Sorry if i'm not to clear on my explanation. Hope you understand.