PDA

View Full Version : Item delete Error and etc...


sys[antaris]
10.10.2006, 17:38
lin_GetItem
DELETE user_item WHERE item_id = @item_id
change to:
UPDATE user_item SET char_id = 0, item_type = 0 WHERE item_id = @item_id

lin_DeleteItem
DELETE user_item FROM USER_ITEM WHERE item_id=@item_id
change to:
UPDATE user_item set char_id=0, item_type=0 WHERE item_id=@item_id

lin_AmountChange
DELETE user_item WHERE char_id = @char_id AND item_id = @item_id
change to:
UPDATE user_item SET char_id = 0, item_type = 0 WHERE char_id = @char_id AND item_id = @item_id

this changes fix all errors in cached eg:


10/10/2006 15:33:xx.xx7, Item delete Error, id[304546]
10/10/2006 15:33:xx.xx7, [.\WareHouse.cpp][4195] item delete fail[304546][1835][1795]


sry my eng :)

Onepex
10.10.2006, 18:04
Cool will try. :>

mantrastic
10.10.2006, 18:05
Its not the wrong forum, he gave info about a fix, good one I must say, thank you.
<edit> nm Onepex, u edited :P, tnx agian sys

Stinker
10.10.2006, 20:04
thanks, cool

astrid
10.10.2006, 22:15
;69852']lin_GetItem
DELETE user_item WHERE item_id = @item_id
change to:
UPDATE user_item SET char_id = 0, item_type = 0 WHERE item_id = @item_id

lin_DeleteItem
DELETE user_item FROM USER_ITEM WHERE item_id=@item_id
change to:
UPDATE user_item set char_id=0, item_type=0 WHERE item_id=@item_id

lin_AmountChange
DELETE user_item WHERE char_id = @char_id AND item_id = @item_id
change to:
UPDATE user_item SET char_id = 0, item_type = 0 WHERE char_id = @char_id AND item_id = @item_id

this changes fix all errors in cached eg:


10/10/2006 15:33:xx.xx7, Item delete Error, id[304546]
10/10/2006 15:33:xx.xx7, [.\WareHouse.cpp][4195] item delete fail[304546][1835][1795]


sry my eng :)


I belive targeted by sys[antaris] strings must be changed to
lin_DeleteItem:
DELETE FROM USER_ITEM WHERE item_id=@item_id
lin_GetItem:
DELETE FROM USER_ITEM WHERE item_id=@item_id
lin_AmountChange
DELETE FROM user_item WHERE char_id = @char_id AND item_id = @item_id
also set in lin_AmountChange
IF ( @nResultAmount = 0 AND @bZeorDelete = 1)
to
IF ( @nResultAmount = 0 AND @bZeorDelete = 0)


Dont know with method is better but this mod take off item delete errors too.
If it set to UPDATE your user_item table will grow _very_ fast i think.

sys[antaris]
10.10.2006, 22:29
//rus Да, при апдейте есть вероятность _быстрого_ роста объема базы при относительно высоком онлайне, постановка на планировщик процедуры lin_DeleteNotOwnedItem решит проблему роста, если на серере отсутсвует время плановых перегрузок, при которых эту работу выполнит Cached.

paul
11.10.2006, 00:44
It wouldn't matter too much. The system upon restart clears out all unowned items so its not too bad. Plus you could always run a little deletion script to remove all the dead items.

seraphii
11.10.2006, 00:49
how database i run this Script...

kin
11.10.2006, 09:56
So, which method is better? Just for conclussion.

Stazis
11.10.2006, 13:32
there is also some other thing in UPDATE
item_id will not change if user delete item and get item of same type - so if you are going to trace stolen e.g. items - UPDATE version is not very good for you

seraphii
11.10.2006, 15:51
When i put the Script in query analyser return this follow erros

Server: Msg 137, Level 15, State 2, Line 2
Must declare the variable '@item_id'.
Server: Msg 137, Level 15, State 1, Line 4
Must declare the variable '@item_id'.
Server: Msg 137, Level 15, State 1, Line 6
Must declare the variable '@char_id'.
Server: Msg 137, Level 15, State 1, Line 8
Must declare the variable '@nResultAmount'.
Server: Msg 137, Level 15, State 1, Line 10
Must declare the variable '@nResultAmount'.

Volpe
12.10.2006, 07:54
PPl use my solution....... Simple ingore the error...because this error not make lag or other problem :)

zcold
12.10.2006, 08:41
When i put the Script in query analyser return this follow erros


It's not script. It's lines, that must be modified in script.

top-gear
12.10.2006, 12:32
are those lines used to alter stored procedures?:)

HF
12.10.2006, 13:02
are those lines used to alter stored procedures?:)
open SQL Server Manager, open Modify for Stored Procedure, change script, press "Executive" for apply patch. New Procedure start work a immediately.
Or what you mean? :)

RumanticK
08.12.2006, 06:01
My players loose their items after restarts... I still can't define the reason, but it is hidden in this patch, 'cause it stopped after rollback of these procedures... %(

HF
08.12.2006, 06:04
My players loose their items after restarts... I still can't define the reason, but it is hidden in this patch, 'cause it stopped after rollback of these procedures... %(
strange. But allgood work on my server. Noone lost items. Check your SProc. I think what you have error somewhere.