Galera estava olhando o fórum e vi um tutorial aqui de como adicionar gold por cada hora que o player ficar online. Rodei a Trigger USE [MuOnline] GO DROP TRIGGER MembStat_RecordOnlineHours GO CREATE TRIGGER MembStat_RecordOnlineHours ON MEMB_STAT FOR UPDATE AS declare @memb___id varchar(10) declare @connectstat tinyint SELECT @memb___id=memb___id,@connectstat=connectstat FROM INSERTED IF (@connectstat = 0) BEGIN UPDATE [dbo].[MEMB_STAT] SET OnlineHours = OnlineHours + datediff(hour, ConnectTM, getdate()) WHERE memb___id = @memb___id END GO quando rodo a USE [MuOnline] GO DROP PROCEDURE [dbo].[WZ_DISCONNECT_MEMB] GO CREATE PROCEDURE [dbo].[WZ_DISCONNECT_MEMB] @memb___id varchar(10) AS Begin set nocount on Declare @find_id varchar(10) Declare @ConnectStat tinyint Declare @OnlineHours real Set @ConnectStat = 0 Set @find_id = 'NOT' select @find_id = S.memb___id from MEMB_STAT S INNER JOIN MEMB_INFO I ON memb___id = memb___id where I.memb___id = @memb___id if( @find_id <> 'NOT' ) begin Update MEMB_STAT SET ConnectStat = @ConnectStat, DisConnectTM = getdate(), OnlineHours = OnlineHours + datediff(hour, ConnectTM, getdate()) where memb___id = @memb___id SELECT @OnlineHours = OnlineHours FROM MEMB_STAT WHERE memb___id = @memb___id Update MEMB_INFO SET gold = gold+(@OnlineHours * 2) WHERE memb___id = @memb___id and @OnlineHours >= '1' Update MEMB_STAT SET OnlineHours = 0 WHERE memb___id = @memb___id end end GO da error, alguém sabe como resolver ? ---------- Post added at 02:10 AM ---------- Previous post was at 02:06 AM ---------- erro Server: Msg 446, Level 16, State 9, Procedure WZ_DISCONNECT_MEMB, Line 11 Cannot resolve collation conflict for equal to operation.
Há 1 usuários navegando neste tópico. (0 registrados e 1 visitantes)
Regras do Fórum