_AddTimedJob Procedure - Help me to fix it

03/11/2016 23:47 NagySandor96#1
Hello,

I'm using vsro database, and wanna to create a lottery item by following speps of this [Only registered and activated users can see links. Click Here To Register...]

I've successfully done every step, only have a prob with making the AddTimedJob Procedure well. I've made a simple copy + paste with a bit editing of @ JobID,but it doesn't work.

Guys, could any of you help me how I should fix it? :confused:

CODE:
PHP Code:
if @ JobID '35129') ------- JobID RefSkill ID
   begin
declare @ charname6 varchar(64
Select charname6=CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @ CharID 
declare @ lottery Avatar varchar(129)
set lottery Avatar = (SELECT TOP 1 GiftItems FROM SRO_VT_SHARD.dbo._LotteryNEWSTONE ORDER BY NEWID())
    
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN charname 6 lottery Avatar,1,0
   end 
Thnks,
NS

p.s.: there isn't any space nex to '@' in the PHP code
03/12/2016 00:20 Bizzyyyyy#2
You are missing a '(' for your if function.

if (@JobID = '35129') ------- JobID = RefSkill ID
begin
declare @[Only registered and activated users can see links. Click Here To Register...]6 varchar(64)
Select @[Only registered and activated users can see links. Click Here To Register...]6=CharName16 from SRO_VT_SHARD.dbo._Char where CharID = @[Only registered and activated users can see links. Click Here To Register...]D
declare @[Only registered and activated users can see links. Click Here To Register...]Avatar varchar(129)
set @[Only registered and activated users can see links. Click Here To Register...]Avatar = (SELECT TOP 1 GiftItems FROM SRO_VT_SHARD.dbo._LotteryNEWSTONE ORDER BY NEWID())
exec SRO_VT_SHARD.dbo._ADD_ITEM_EXTERN @[Only registered and activated users can see links. Click Here To Register...]6, @[Only registered and activated users can see links. Click Here To Register...]Avatar,1,0
end

The error message would be helpfull
03/12/2016 02:25 NagySandor96#3
Here's a picture. Is it enough ?
[Only registered and activated users can see links. Click Here To Register...]
03/12/2016 06:46 ​Exo#4
Quote:
Originally Posted by NagySandor96 View Post
Here's a picture. Is it enough ?
[Only registered and activated users can see links. Click Here To Register...]
ayy check your commas
03/12/2016 19:04 NagySandor96#5
still the same error
03/13/2016 14:43 Bizzyyyyy#6
remove the "end" after return @[Only registered and activated users can see links. Click Here To Register...]JobID and add a "," between your values...
08/17/2016 21:28 NagySandor96#7
@[Only registered and activated users can see links. Click Here To Register...] !
Everything works fine,but when I'm using the scroll in-game I dont get anything.
I guess the procedure isn't perfect. Could you help me? :/

#Problem has been solved
The correct Procedure which has to be added to SRO_VT_LOG>_AddLogItem Procedure

//attached the correct procedure//
08/17/2016 23:26 Spidy.#8
^
Closed