الموقع العربي الاول للعبة Silkroad Online

الموقع العربي الاول للعبة Silkroad Online (https://silkroad4arab.com/vb/index.php)
-   قسم الاسئلة و الاستفسارات لعمل السيرفرات الخاصة (https://silkroad4arab.com/vb/forumdisplay.php?f=226)
-   -   failed to permanent removing of character (https://silkroad4arab.com/vb/showthread.php?t=579952)

loverslove 25-02-2015 11:23 AM

failed to permanent removing of character
 
انا بيجلى ال error ده على طول كل اما امسح char
كود PHP:

failed to permanent removing of character ! [JID14CharID7895ErrorCode: -10000


Hamza FiGo 25-02-2015 12:39 PM

رد: ارجو دخول الخبراء
 
تمت الموفقة. بس بعد كدة بعد اذنك تسمي الموضوع باسم المشكلة علشان المشرفين يوافقة علي مشكلتك

تاني حاجة هتروح علي المسار دا

SRO_VT_SHARD >> Programmabilty >> Stored Procedure > _DeleteCharPermanently


هتشيل اللي موجود عندك وهضيف دا

كود:

USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_DeleteCharPermanently]    Script Date: 25/02/2015 11:36:27 ص ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO


--!!!CHECK!!!
ALTER              PROCEDURE [dbo].[_DeleteCharPermanently]
@CharID        as int
as
        ------------------------------------
        -- 일단 삭제된 캐릭인지 부터 검사!
        ------------------------------------
        if (not exists(select charid from _deletedchar where charid = @CharID))
        begin
                return -1
        end
        ------------------------------------
        -- 삭제후 경과된 시간이 대략 7일이 맞는가 확인 (샤드에 혹시 버그가 있을지 모르니깐...)
        ------------------------------------
        declare @deleted_date datetime
        declare @cur_date          datetime
        declare @elapsed_min int
        declare @UserJID                int
--        declare @deleted_slot  int
        set @cur_date = getdate()
        select @UserJID = UserJID, /*@deleted_slot = CharSlot,*/ @deleted_date = deleteddate  from _deletedchar with (nolock) where charid = @CharID
       
        -- 삭제시킨지 6일 + 23시간 이상이 지난 캐릭인가? (1시간 정도의 오차라면 인정해 준다 냐하~)
        set @elapsed_min = datediff(minute, @deleted_date, @cur_date)
        if (@elapsed_min < ((60 * 24 * 6) + (60 * 23)))
        begin
                return -2
        end
        ------------------------------------
        -- 삭제된 캐릭이 맞는지 다시한번 확인
        ------------------------------------
        declare @is_deleted tinyint
        select @is_deleted = deleted from _Char where CharID = @CharID
        if (@is_deleted <> 1)
        begin
                return -3
        end

        ------------------------------------
        -- 지울 캐릭이 _User 에 있는 CharID와 일치하는가 검사
        ------------------------------------
        declare @char_id_to_check                int
        set @char_id_to_check = 0

/*        -- commented by novice. for server integration.
        if (@deleted_slot = 0)
                begin        select @char_id_to_check = CharID1 from _User where UserJID = @UserJID end
        else if (@deleted_slot = 1)
                begin        select @char_id_to_check = CharID2 from _User where UserJID = @UserJID end
        else if (@deleted_slot = 2)
                begin        select @char_id_to_check = CharID3 from _User where UserJID = @UserJID end
        else
                begin
                        return -4
                end
        -- 켁! 어떻게 된거야?  이상한 넘이 자리를 차지하고 있다!
        if (@char_id_to_check <> @CharID)
        begin
                return -5
        end
*/
        -- start by novice.
        select @char_id_to_check = CharID from _User where UserJID = @UserJID and CharID = @CharID
       
        if (@char_id_to_check = 0)
        begin
                -- 지울 캐릭터가 _User 에 없어?
                return -5
        end
        -- finish by novice.
       
begin transaction
       
        declare @GuildID int
        exec @GuildID = _DeleteCharPermanently_NoTX  @UserJID, @CharID --, @deleted_slot
        if (@GuildID is null)
                set @GuildID = -10000       
        if (@GuildID < 0)
        begin
                rollback transaction
                return @GuildID
        end       
commit transaction
       
        return @GuildID



الساعة الآن 10:27 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.