![]() |
Item delete Error and etc...
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: Code:
10/10/2006 15:33:xx.xx7, Item delete Error, id[304546] |
Cool will try. :>
|
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 |
thanks, cool
|
Quote:
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. |
//rus Да, при апдейте есть вероятность _быстрого_ роста объема базы при относительно высоком онлайне, постановка на планировщик процедуры lin_DeleteNotOwnedItem решит проблему роста, если на серере отсутсвует время плановых перегрузок, при которых эту работу выполнит Cached.
|
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.
|
how database i run this Script...
|
So, which method is better? Just for conclussion.
|
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 |
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'. |
PPl use my solution....... Simple ingore the error...because this error not make lag or other problem :)
|
Quote:
|
are those lines used to alter stored procedures?:)
|
Quote:
Or what you mean? :) |
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... %(
|
Quote:
|
| All times are GMT. The time now is 15:32. |