well i'm writing my own query which it will help me to add custom items to the npc with the codename only !
so all works as far as i can feel it now
but i have a wired error shows if i tried to add another item ( the error cased by the Identity in _RefPackageitem)
my codes
it works fine for the first item !
but if i tried to add 2nd item it works fine but with a hecka high ID ! = [Only registered and activated users can see links. Click Here To Register...]
but if i tried to add the 3rd item i get this error !
[Only registered and activated users can see links. Click Here To Register...]
so i wonder which part made this error ?
----------------------Edit
already solved :D
it should be _RefPackageitem Not _RefObjCommon my bad sorry
so all works as far as i can feel it now
but i have a wired error shows if i tried to add another item ( the error cased by the Identity in _RefPackageitem)
my codes
Code:
if not exists ( select ID from _RefPackageItem where ID = 1 ) SET @ID = '1' if exists ( select ID from _RefPackageItem where ID = 1 ) SET @ID = (SELECT TOP 1 ID FROM _RefObjCommon ORDER BY ID DESC )+1
but if i tried to add 2nd item it works fine but with a hecka high ID ! = [Only registered and activated users can see links. Click Here To Register...]
but if i tried to add the 3rd item i get this error !
[Only registered and activated users can see links. Click Here To Register...]
so i wonder which part made this error ?
----------------------Edit
already solved :D
Code:
if not exists ( select ID from _RefPackageItem where ID = 1 ) SET @ID = '1' if exists ( select ID from _RefPackageItem where ID = 1 ) SET @ID = (SELECT TOP 1 ID FROM [B][COLOR="DarkRed"][COLOR="Red"]_RefObjCommon[/COLOR][/COLOR][/B] ORDER BY ID DESC )+1