Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 10.10.2006, 17:38   #1
sys[antaris]
Архивный участник
 
Join Date: May 2005
Posts: 73
Default 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]
10/10/2006 15:33:xx.xx7, [.\WareHouse.cpp][4195] item delete fail[304546][1835][1795]
sry my eng
sys[antaris] is offline  
Old 10.10.2006, 18:04   #2
Onepex
Архивный участник
 
Join Date: May 2006
Posts: 110
Default

Cool will try. :>
Onepex is offline  
Old 10.10.2006, 18:05   #3
mantrastic
Архивный участник
 
Join Date: Apr 2006
Posts: 338
Default

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
mantrastic is offline  
Old 10.10.2006, 20:04   #4
Stinker
Архивный участник
 
Join Date: May 2006
Posts: 43
Default

thanks, cool
Stinker is offline  
Old 10.10.2006, 22:15   #5
astrid
Архивный участник
 
Join Date: May 2006
Posts: 55
Default

Quote:
Originally Posted by sys[antaris] View Post
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]
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.
astrid is offline  
Old 10.10.2006, 22:29   #6
sys[antaris]
Архивный участник
 
Join Date: May 2005
Posts: 73
Default

//rus Да, при апдейте есть вероятность _быстрого_ роста объема базы при относительно высоком онлайне, постановка на планировщик процедуры lin_DeleteNotOwnedItem решит проблему роста, если на серере отсутсвует время плановых перегрузок, при которых эту работу выполнит Cached.
sys[antaris] is offline  
Old 11.10.2006, 00:44   #7
paul
Архивный участник
 
Join Date: Feb 2005
Posts: 390
Default

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.
paul is offline  
Old 11.10.2006, 00:49   #8
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

how database i run this Script...
seraphii is offline  
Old 11.10.2006, 09:56   #9
kin
Архивный участник
 
Join Date: Sep 2006
Posts: 882
Default

So, which method is better? Just for conclussion.
kin is offline  
Old 11.10.2006, 13:32   #10
Stazis
Архивный участник
 
Join Date: Feb 2005
Posts: 200
Default

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
Stazis is offline  
Old 11.10.2006, 15:51   #11
seraphii
Архивный участник
 
Join Date: Jun 2006
Posts: 126
Default

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'.
seraphii is offline  
Old 12.10.2006, 07:54   #12
Volpe
Архивный участник
 
Join Date: May 2006
Posts: 15
Default

PPl use my solution....... Simple ingore the error...because this error not make lag or other problem
Volpe is offline  
Old 12.10.2006, 08:41   #13
zcold
Архивный участник
 
Join Date: Nov 2005
Posts: 146
Default

Quote:
Originally Posted by seraphii View Post
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.
zcold is offline  
Old 12.10.2006, 12:32   #14
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default

are those lines used to alter stored procedures?
top-gear is offline  
Old 12.10.2006, 13:02   #15
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by top-gear View Post
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?
HF is offline  
Old 08.12.2006, 06:01   #16
RumanticK
Архивный участник
 
Join Date: Feb 2006
Posts: 66
Default

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... %(
RumanticK is offline  
Old 08.12.2006, 06:04   #17
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by RumanticK View Post
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.
HF is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 19:30.