Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

"Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWriter!

Newbie Spellweaver
Joined
Nov 23, 2013
Messages
21
Reaction score
0
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

Error:
Msg 137, Level 15, State 2, Line 1Must declare the scalar variable "@EventID".
Msg 137, Level 15, State 2, Line 3
Must declare the scalar variable "@desc".
Msg 137, Level 15, State 2, Line 10
Must declare the scalar variable "@desc".
Msg 102, Level 15, State 1, Line 12
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Line 13
Incorrect syntax near '@killername'.
Msg 137, Level 15, State 2, Line 14
Must declare the scalar variable "@killername".
Msg 102, Level 15, State 1, Line 16
Incorrect syntax near '@desc'.
Msg 137, Level 15, State 2, Line 18
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Line 23
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 29
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 30
Must declare the scalar variable "@jobType".
Msg 137, Level 15, State 2, Line 32
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Line 36
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 37
Must declare the scalar variable "@CharnickName".
Msg 137, Level 15, State 2, Line 41
Must declare the scalar variable "@killername".
Msg 137, Level 15, State 2, Line 44
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 46
Must declare the scalar variable "@CharID".
 
Experienced Elementalist
Joined
Aug 22, 2013
Messages
208
Reaction score
125
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

No i have SQL Server 2008 R2

Give me ur Skype

Then you put wrong variables at declaration statement lines. Those error were simply SQL errors in general which can happen in any SP at anytime. So take your time to review your own statements in the SP, doing raw copy + paste + complaint won't get your anywhere.

Or better yet, attach your SP here.
 
Newbie Spellweaver
Joined
Nov 23, 2013
Messages
21
Reaction score
0
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

Then you put wrong variables at declaration statement lines. Those error were simply SQL errors in general which can happen in any SP at anytime. So take your time to review your own statements in the SP, doing raw copy + paste + complaint won't get your anywhere.

Or better yet, attach your SP here.

Code:
USE [LOG_DB]GO
/****** Object:  StoredProcedure [dbo].[_AddLogChar]    Script Date: 01/09/2014 20:12:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO




ALTER   procedure [dbo].[_AddLogChar]  [USER=551894]Char[/USER]ID		int, [USER=1333420483]event[/USER]ID		tinyint, [USER=1333359883]data[/USER]1		int, [USER=1333359883]data[/USER]2		int,
@strPos		varchar(64), [USER=275999]des[/USER]c		varchar(128)
as 


if( [USER=1333420483]event[/USER]ID=4 or [USER=1333420483]event[/USER]ID=6  or [USER=1333420483]event[/USER]ID=9 )
BEGIN
	declare [USER=1333463735]Len[/USER]_pos 	int
	declare [USER=1333463735]Len[/USER]_desc	int
	set [USER=1333463735]Len[/USER]_pos = len(@strPos)
	set [USER=1333463735]Len[/USER]_desc = len [USER=275999]des[/USER]c)
	if  [USER=1333463735]Len[/USER]_pos > 0 and [USER=1333463735]Len[/USER]_desc > 0)
	begin	
		insert _LogEventChar values [USER=551894]Char[/USER]ID, GetDate(), [USER=1333420483]event[/USER]ID, [USER=1333359883]data[/USER]1, [USER=1333359883]data[/USER]2, @strPos, [USER=275999]des[/USER]c)	
	end
	else if  [USER=1333463735]Len[/USER]_pos > 0 and [USER=1333463735]Len[/USER]_desc = 0)
	begin 	
		insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, EventPos) values [USER=551894]Char[/USER]ID, GetDate(), [USER=1333420483]event[/USER]ID, [USER=1333359883]data[/USER]1, [USER=1333359883]data[/USER]2, @strPos)
	end
	else if  [USER=1333463735]Len[/USER]_pos = 0 and [USER=1333463735]Len[/USER]_desc > 0)
	begin 	
		insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, strDesc) values [USER=551894]Char[/USER]ID, GetDate(), [USER=1333420483]event[/USER]ID, [USER=1333359883]data[/USER]1, [USER=1333359883]data[/USER]2, [USER=275999]des[/USER]c)
	end
	else
	begin
		insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2) values [USER=551894]Char[/USER]ID, GetDate(), [USER=1333420483]event[/USER]ID, [USER=1333359883]data[/USER]1, [USER=1333359883]data[/USER]2)
	end
--DELETE  TOP (3) FROM _LogEventChar WHERE EventTime < DATEADD(week, -2, GETDATE())
END
 
Experienced Elementalist
Joined
Aug 22, 2013
Messages
208
Reaction score
125
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

no no... don't paste your SP, i said "ATTACH", not "PASTE", RageZone has weird feature translating words began with "@" as link to user profile, which is annoying, it'll mess up some codes.. so attach it as file.
 
Newbie Spellweaver
Joined
Nov 23, 2013
Messages
21
Reaction score
0
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

no no... don't paste your SP, i said "ATTACH", not "PASTE", RageZone has weird feature translating words began with "@" as link to user profile, which is annoying, it'll mess up some codes.. so attach it as file.


OK uploaded
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Apr 13, 2008
Messages
149
Reaction score
3
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

After change declaration to 2005 Version I still have errors

Code:
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 46
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 47
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 51
Incorrect syntax near '@desc'.
 
Newbie Spellweaver
Joined
Oct 18, 2013
Messages
11
Reaction score
4
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

After change declaration to 2005 Version I still have errors

Code:
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 46
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 47
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 51
Incorrect syntax near '@desc'.

No offense but if you dont master SQL basics, you shouldn't waste your time on db editing.
 
Newbie Spellweaver
Joined
Nov 23, 2013
Messages
21
Reaction score
0
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

Hey man check please
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Jan 6, 2012
Messages
54
Reaction score
3
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

why my strdesc is null. I used SP on first page

0 461933 320888 3 2014-01-02 14:09:00.057 ?? ?(0x5faa) (546, 127) NULL

so Tool writenoice dont send msg and crash

the same problem
 
Newbie Spellweaver
Joined
Jan 6, 2012
Messages
54
Reaction score
3
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

help me?
 
Newbie Spellweaver
Joined
Jan 6, 2012
Messages
54
Reaction score
3
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

why my strdesc is null. I used SP on first page

0 461933 320888 3 2014-01-02 14:09:00.057 ?? ?(0x5faa) (546, 127) NULL

so Tool writenoice dont send msg and crash
 
Newbie Spellweaver
Joined
Dec 2, 2012
Messages
43
Reaction score
0
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 39
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 44
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 45
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 48
Incorrect syntax near '@desc'.
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 50
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 62
Must declare the scalar variable "@jobType".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 64
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 69
Must declare the scalar variable "@jobDesc".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 73
Must declare the scalar variable "@jobDesc".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 76
Must declare the scalar variable "@jobType".
Msg 156, Level 15, State 1, Procedure _AddLogChar, Line 80
Incorrect syntax near the keyword 'END'.


!!
 
Junior Spellweaver
Joined
Apr 13, 2008
Messages
149
Reaction score
3
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

Code:
USE [LOG_DB]
GO
/****** Object:  StoredProcedure [dbo].[_AddLogChar]    Script Date: 02/07/2014 01:52:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


ALTER   procedure [dbo].[_AddLogChar] 
 [USER=551894]Char[/USER]ID		int,
 [USER=1333420483]event[/USER]ID		tinyint,
 [USER=1333359883]data[/USER]1		int,
 [USER=1333359883]data[/USER]2		int,
@strPos		varchar(64),
 [USER=275999]des[/USER]c		varchar(128)
as

IF  [USER=1333420483]event[/USER]ID != 20)
BEGIN
	declare [USER=1333463735]Len[/USER]_pos 	int
	declare [USER=1333463735]Len[/USER]_desc	int
	set [USER=1333463735]Len[/USER]_pos = len(@strPos)
	set [USER=1333463735]Len[/USER]_desc = len [USER=275999]des[/USER]c)

	if  [USER=1333463735]Len[/USER]_pos > 0 and [USER=1333463735]Len[/USER]_desc > 0)
	begin	
		insert _LogEventChar values [USER=551894]Char[/USER]ID, GetDate(), [USER=1333420483]event[/USER]ID, [USER=1333359883]data[/USER]1, [USER=1333359883]data[/USER]2, @strPos, [USER=275999]des[/USER]c)	
	end
	else if  [USER=1333463735]Len[/USER]_pos > 0 and [USER=1333463735]Len[/USER]_desc = 0)
	begin 	
		insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, EventPos) values [USER=551894]Char[/USER]ID, GetDate(), [USER=1333420483]event[/USER]ID, [USER=1333359883]data[/USER]1, [USER=1333359883]data[/USER]2, @strPos)
	end
	else if  [USER=1333463735]Len[/USER]_pos = 0 and [USER=1333463735]Len[/USER]_desc > 0)
	begin 	
		insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, strDesc) values [USER=551894]Char[/USER]ID, GetDate(), [USER=1333420483]event[/USER]ID, [USER=1333359883]data[/USER]1, [USER=1333359883]data[/USER]2, [USER=275999]des[/USER]c)
	end
	else
	begin
		insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2) values [USER=551894]Char[/USER]ID, GetDate(), [USER=1333420483]event[/USER]ID, [USER=1333359883]data[/USER]1, [USER=1333359883]data[/USER]2)
	end
END
IF  [USER=1333420483]event[/USER]ID = 20) -- PVP
BEGIN
    IF   [USER=275999]des[/USER]c LIKE '%Trader, Neutral, no freebattle team%'    -- Trader
        OR [USER=275999]des[/USER]c LIKE '%Hunter, Neutral, no freebattle team%'    -- Hunter
        OR [USER=275999]des[/USER]c LIKE '%Robber, Neutral, no freebattle team%'    -- Thief
        OR [USER=275999]des[/USER]c like '%no job, Neutral, %no job, Neutral%'    -- Free PVP
    )
    BEGIN
        -- Get killer name
        DECLARE [USER=434304]killername[/USER] VARCHAR(512) 
		SET [USER=434304]killername[/USER] = [USER=275999]des[/USER]c
        DECLARE [USER=803511]killeri[/USER]D INT 
		SET [USER=803511]killeri[/USER]D = 0
        SELECT [USER=434304]killername[/USER] = REPLACE [USER=434304]killername[/USER], LEFT [USER=434304]killername[/USER], CHARINDEX('(', [USER=434304]killername[/USER])), '')
        SELECT [USER=434304]killername[/USER] = REPLACE [USER=434304]killername[/USER], RIGHT [USER=434304]killername[/USER], CHARINDEX(')', REVERSE [USER=434304]killername[/USER]))), '')
        SELECT [USER=803511]killeri[/USER]D = CharID FROM [SRO_VT_SHARD_INIT].[dbo].[_Char] WHERE CharName16 = [USER=434304]killername[/USER]
        -- Get job type
        DECLARE [USER=768752]job[/USER]String VARCHAR(10) 
		SET [USER=768752]job[/USER]String= LTRIM(RTRIM(SUBSTRING [USER=275999]des[/USER]c, 5, 7)))
        DECLARE [USER=768752]job[/USER]Type INT 
		SET [USER=768752]job[/USER]Type= CASE
            WHEN [USER=768752]job[/USER]String LIKE 'Trader' THEN 1
            WHEN [USER=768752]job[/USER]String LIKE 'Robber' THEN 2
            WHEN [USER=768752]job[/USER]String LIKE 'Hunter' THEN 3
            ELSE 0 END
        -- Delete original log
        DELETE FROM _LogEventChar WHERE CharID = [USER=551894]Char[/USER]ID AND EventID = 20
            AND (strDesc LIKE '%Trader, Neutral, no freebattle team%'
            OR strDesc LIKE '%Hunter, Neutral, no freebattle team%'
            OR strDesc LIKE '%Robber, Neutral, no freebattle team%'
            OR [USER=275999]des[/USER]c like '%no job, Neutral, %no job, Neutral%')
        -- Get additional info for notice message
        DECLARE [USER=551894]Char[/USER]Name VARCHAR(64) 
		SET [USER=551894]Char[/USER]Name = (SELECT CharName16 FROM [SRO_VT_SHARD_INIT].[dbo].[_Char] WHERE CharID = [USER=551894]Char[/USER]ID)
        DECLARE [USER=768752]job[/USER]Desc VARCHAR(32) 
		SET [USER=768752]job[/USER]Desc= CASE WHEN [USER=768752]job[/USER]Type BETWEEN 1 AND 3 THEN 'Job Conflict' ELSE 'Free PVP' END
        DECLARE @strDesc VARCHAR(512)
        IF   [USER=768752]job[/USER]String LIKE 'Trader' OR [USER=768752]job[/USER]String LIKE 'Robber' OR [USER=768752]job[/USER]String LIKE 'Hunter')
        BEGIN
            -- If it's a Job Kill, then write character nicknames
            DECLARE [USER=770918]killer[/USER]NickName VARCHAR(64) 
			SET [USER=770918]killer[/USER]NickName = (SELECT NickName16 FROM [SRO_VT_SHARD_INIT].[dbo].[_Char] WHERE CharID = [USER=803511]killeri[/USER]D)
            DECLARE [USER=1333392005]Charnic[/USER]kName VARCHAR(64) 
			SET [USER=1333392005]Charnic[/USER]kName= (SELECT NickName16 FROM [SRO_VT_SHARD_INIT].[dbo].[_Char] WHERE CharID = [USER=551894]Char[/USER]ID)
            SET @strDesc = '[' + [USER=770918]killer[/USER]NickName + '] has just killed [' + [USER=1333392005]Charnic[/USER]kName + '] in [' + [USER=768752]job[/USER]Desc + '] mode on [' + CONVERT(NVARCHAR(30), GETDATE(), 0) + ']'
        END
        ELSE BEGIN
            -- If it's normal PVP Kill, write real character names
            SET @strDesc = '[' + [USER=434304]killername[/USER] + '] has just killed [' + [USER=551894]Char[/USER]Name + '] in [' + [USER=768752]job[/USER]Desc + '] mode on [' + CONVERT(NVARCHAR(30), GETDATE(), 0) + ']'
        END
        -- Update the log
        INSERT INTO _LogEventPVP VALUES (0, [USER=803511]killeri[/USER]D, [USER=551894]Char[/USER]ID, [USER=768752]job[/USER]Type, GETDATE(), @strPos, @strDesc)
        -- Flag notice if it's not sent more than 5 minutes
        UPDATE _LogEventPVP SET isSent = 1 WHERE CharID = [USER=551894]Char[/USER]ID AND EventTime < DATEADD(MINUTE, -5, GETDATE())
    END
END

Script works great, but when I kill some1 then nothing added to DB :<
 
Initiate Mage
Joined
Jan 14, 2014
Messages
2
Reaction score
0
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

Witchy Moo - "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWriter! - RaGEZONE Forums




What is the cause of this error? Locations, please help me to correct the information I am writing Waiting
 
Newbie Spellweaver
Joined
Nov 23, 2013
Messages
21
Reaction score
0
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

My ERROR:


Msg 137, Level 15, State 2, Line 1
Must declare the scalar variable "@EventID".
Msg 137, Level 15, State 2, Line 3
Must declare the scalar variable "@desc".
Msg 137, Level 15, State 2, Line 10
Must declare the scalar variable "@desc".
Msg 102, Level 15, State 1, Line 12
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Line 13
Incorrect syntax near '@killername'.
Msg 137, Level 15, State 2, Line 14
Must declare the scalar variable "@killername".
Msg 102, Level 15, State 1, Line 16
Incorrect syntax near '@desc'.
Msg 137, Level 15, State 2, Line 18
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Line 23
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 29
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 30
Must declare the scalar variable "@jobType".
Msg 137, Level 15, State 2, Line 32
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Line 36
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 37
Must declare the scalar variable "@CharnickName".
Msg 137, Level 15, State 2, Line 41
Must declare the scalar variable "@killername".
Msg 137, Level 15, State 2, Line 44
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 46
Must declare the scalar variable "@CharID".


and Attachs SP
 

Attachments

You must be registered for see attachments list
Last edited:
Experienced Elementalist
Joined
Nov 9, 2011
Messages
264
Reaction score
54
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

AddLogChar gives me these errors :
Code:
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 81
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 86
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 87
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 90
Incorrect syntax near '@desc'.
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 92
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 104
Must declare the scalar variable "@jobType".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 106
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 111
Must declare the scalar variable "@jobDesc".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 115
Must declare the scalar variable "@jobDesc".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 118
Must declare the scalar variable "@jobType".
Msg 156, Level 15, State 1, Procedure _AddLogChar, Line 122
Incorrect syntax near the keyword 'END'.
 
Junior Spellweaver
Joined
Jan 14, 2013
Messages
167
Reaction score
59
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

Seriously you guys are all stupid as duck.
The poop is just missing a few brackets... can you even set those yourself?
 
Newbie Spellweaver
Joined
Apr 2, 2013
Messages
27
Reaction score
1
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite

:junglejane: ok I'm new to this, so I only get that Systema Copy and execute these queries Explain to me please
 
Back
Top