-
[Help]What to put in @GroupName
Hi all!
My bank teller does not work. When I got the item I am disconnected from the server.
The solution is to use Store Procedure dbo.usp_Gift_Insert.
My question is what to put in @GroupName field?
Or does anyone have the fix for the bank teller? :ehh:
Thx all!
-
Re: What to put in @GroupName
try
for gmtools stored proc's
Code:
--SELECT @GameDB=GameDB FROM GroupList WHERE GroupName=@GroupName
--SET @Table = @GameDB+'.PS_GameData.dbo.UserStoredPointItems '
SET @Table = 'PS_GameData.dbo.UserStoredPointItems '
-
Re: What to put in @GroupName
Thx Twilight.
But I think not well formulated the question. I want to know what to fill in the field @GroupName. :/:
Twilight, you know why the Gift Item does not work in game? When I send a Gift to my character, putting the name of another player, the transaction appears to have been successful and the APs are discounted.
When I log into another account the Gift Box is empty.
You think I can do Webmall insert these gifts?
TYVM :thumbup:
-
Re: What to put in @GroupName
Quote:
Originally Posted by
cmaxlobo
Thx Twilight.
But I think not well formulated the question. I want to know what to fill in the field @GroupName. :/:
This value is now not working as well as a group list is required for multiple servers that would not be any confusion in choosing the base ..
You can specify any name with the real names of databases PS_ *
-
3 Attachment(s)
Re: What to put in @GroupName
Quote:
Originally Posted by
cmaxlobo
Twilight, you know why the Gift Item does not work in game? When I send a Gift to my character, putting the name of another player, the transaction appears to have been successful and the APs are discounted.
When I log into another account the Gift Box is empty.
TYVM :thumbup:
Test ....my server 5.2
PS:
I do not have such errors.
Once again I suggest you look into LOG file server, and you will see the error.
These errors may PS_Ncash linked server does not work for RPC (in / out) in the settings of the linked server
-
1 Attachment(s)
Re: What to put in @GroupName
Look at this:
Buy Item = Purchased Item - Work
Gift Item = No Item lacated in That spot - Bad :-(
Is there any related GiftBox sdata?
-
Re: What to put in @GroupName
Quote:
Originally Posted by
cmaxlobo
Look at this:
Buy Item = Purchased Item - Work
Gift Item = No Item lacated in That spot - Bad :-(
Is there any related GiftBox sdata?
bcoz stored procedure NCash not work or error executing
plz see logs
PSM_Client\Bin\Log\*.log
-
Re: What to put in @GroupName
Hummm... I tried with two items and got this log:
Code:
2010-10-20 11:53:22 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Server 'PS_NCASH' is not configured for RPC., SQL STATE: 42000, NATIVE ERROR: 7411 (0x1CF3)
2010-10-20 11:53:22 SaveGiftPointItem 25 GMA-Goddess qerr=100, {? = call [usp_Save_User_NCash](7,36,'B1_Robag0001')}
2010-10-20 11:53:46 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Server 'PS_NCASH' is not configured for RPC., SQL STATE: 42000, NATIVE ERROR: 7411 (0x1CF3)
2010-10-20 11:53:46 SaveGiftPointItem 25 GMA-Goddess qerr=100, {? = call [usp_Save_User_NCash](7,36,'SH1_0001')}
Store procedure
Code:
USE [PS_GameData]
GO
/****** Object: StoredProcedure [dbo].[usp_Save_User_NCash] Script Date: 10/20/2010 12:10:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Proc [dbo].[usp_Save_User_NCash]
@BuyUserUID int,
@TargetUserID int,
@ProductCode varchar(20)
AS
SET NOCOUNT ON
DECLARE @Ret int
DECLARE @OrderNumber int
DECLARE @RemainPoint int
SET @Ret = 0
/*========================================
아이템 구매
구매일 경우 구매 유저 UID 와 받는 유저 UID를 똑같이 입력하면 됩니다.
procRequestOrderProductByGame
구매유저 UID @buyClientUserNumber BIGINT
받는유저 UID @receiveClientUserNumber BIGINT
아이템코드 @itemCode VARCHAR(50)
결과 코드 @resultCode SMALLINT OUTPUT
결제 후 잔액 @cashBalanceAfterOrder INT OUTPUT
구매번호 @orderNumber INT OUTPUT
resultCode
0 성공
1 잔액부족
2 해당 사용자 존재하지 않음
3 해당 아이템이 존재하지 않음
5 DB오류
6 기타오류
=========================================*/
EXEC [PS_NCASH].[Billcrux30].dbo.procRequestOrderProductByGame @BuyUserUID,@TargetUserID,@ProductCode,@Ret OUTPUT, @RemainPoint OUTPUT, @OrderNumber OUTPUT
IF( @@ERROR <> 0 )
BEGIN
INSERT INTO PointErrorLog( UserUID, CharID, ProductCode, Ret) VALUES( @BuyUserUID, NULL, @ProductCode, 100 )
SET @Ret = 7
RETURN @Ret
END
IF ( @Ret <> 0 )
BEGIN
INSERT INTO PointErrorLog( UserUID, CharID, ProductCode, Ret) VALUES( @BuyUserUID, NULL, @ProductCode, @Ret )
END
SET @Ret = CASE @Ret
WHEN 0 THEN 0
WHEN 1 THEN 10
WHEN 2 THEN 1
WHEN 3 THEN 6
ELSE 7
END
RETURN @Ret
SET NOCOUNT OFF
--SET XACT_ABORT OFF
:drool:
---------- Post added at 12:04 PM ---------- Previous post was at 10:56 AM ----------
I tried your own solution on this topic: http://forum.ragezone.com/f557/ps_db...-error-665082/
Now I have the following log:
Code:
2010-10-20 12:41:27 err=-1, [Microsoft][ODBC SQL Server Driver]Tempo excedido, SQL STATE: HYT00, NATIVE ERROR: 0 (0x0)
2010-10-20 12:41:27 SaveGiftPointItem 25 GMA-Goddess qerr=100, {? = call [usp_Save_User_NCash](7,36,'SH1_0001')}
With this procedure:
Code:
use PS_GameData;
GO
drop procedure [dbo].[usp_Save_User_NCash]
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE Proc [dbo].[usp_Save_User_NCash]
@BuyUserUID int,
@TargetUserID int,
@ProductCode varchar(20)
AS
SET NOCOUNT ON
DECLARE @Ret int
DECLARE @OrderNumber int
DECLARE @RemainPoint int
SET @Ret = 0
/*========================================
아이템 구매
구매일 경우 구매 유저 UID 와 받는 유저 UID를 똑같이 입력하면 됩니다.
procRequestOrderProductByGame
구매유저 UID @buyClientUserNumber BIGINT
받는유저 UID @receiveClientUserNumber BIGINT
아이템코드 @itemCode VARCHAR(50)
결과 코드 @resultCode SMALLINT OUTPUT
결제 후 잔액 @cashBalanceAfterOrder INT OUTPUT
구매번호 @orderNumber INT OUTPUT
resultCode
0 성공
1 잔액부족
2 해당 사용자 존재하지 않음
3 해당 아이템이 존재하지 않음
5 DB오류
6 기타오류
=========================================*/
EXEC dbo.procRequestOrderProductByGame @BuyUserUID,@TargetUserID,@ProductCode,@Ret OUTPUT, @RemainPoint OUTPUT, @OrderNumber OUTPUT
IF( @@ERROR <> 0 )
BEGIN
INSERT INTO PointErrorLog( UserUID, CharID, ProductCode, Ret) VALUES( @BuyUserUID, NULL, @ProductCode, 100 )
SET @Ret = 7
RETURN @Ret
END
IF ( @Ret <> 0 )
BEGIN
INSERT INTO PointErrorLog( UserUID, CharID, ProductCode, Ret) VALUES( @BuyUserUID, NULL, @ProductCode, @Ret )
END
SET @Ret = CASE @Ret
WHEN 0 THEN 0
WHEN 1 THEN 10
WHEN 2 THEN 1
WHEN 3 THEN 6
ELSE 7
END
RETURN @Ret
SET NOCOUNT OFF
--SET XACT_ABORT OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
-
2 Attachment(s)
Re: What to put in @GroupName
Quote:
Originally Posted by
cmaxlobo
Hummm... I tried with two items and got this log:
Code:
2010-10-20 11:53:22 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Server 'PS_NCASH' is not configured for RPC., SQL STATE: 42000, NATIVE ERROR: 7411 (0x1CF3)
2010-10-20 11:53:22 SaveGiftPointItem 25 GMA-Goddess qerr=100, {? = call [usp_Save_User_NCash](7,36,'B1_Robag0001')}
Default store proc (no change) - ok but... is not configured for RPC
Example: 2000 SQL....same 2008
-
Re: What to put in @GroupName
When I tried to enable the RPC I got this error message. Now I'm searching on Google for a solution. :?:
Code:
TITLE: Microsoft SQL Server Management Studio
------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
ADDITIONAL INFORMATION:
Ad hoc updates to system catalogs are not allowed. (Microsoft SQL Server, Error: 259)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=259&LinkId=20476
------------------------------
-
1 Attachment(s)
Re: What to put in @GroupName
Quote:
Originally Posted by
cmaxlobo
When I tried to enable the RPC I got this error message. Now I'm searching on Google for a solution. :?:
Code:
TITLE: Microsoft SQL Server Management Studio
------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
ADDITIONAL INFORMATION:
Ad hoc updates to system catalogs are not allowed. (Microsoft SQL Server, Error: 259)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=259&LinkId=20476
------------------------------
So..
Step 1
execute two SQL command
Code:
sp_configure 'allow updates', 1
reconfigure with override
Step 2
Delete manual PS_Ncash linked server
Step 3
open SQLQueryNcash_Linked.sql
and change login and pass..if need and save
Step 4
execute SQLQueryNcash_Linked.sql
-
2 Attachment(s)
Re: What to put in @GroupName
Interesting. I followed the steps suggested.
The first time I run, do not appear any message.
The second time, The message: "Previous request in process. Please try again leter."
And now I have this log on Time Out
Code:
2010-10-21 11:25:45 err=-1, [Microsoft][ODBC SQL Server Driver]Time out, SQL STATE: HYT00, NATIVE ERROR: 0 (0x0)
2010-10-21 11:25:45 SaveGiftPointItem 25 GMA-Goddess qerr=100, {? = call [usp_Save_User_NCash](7,36,'B1_Exthmr2000')}
I think we're very close to the solution. :thumbup:
-
Re: What to put in @GroupName
Quote:
Originally Posted by
cmaxlobo
Interesting. I followed the steps suggested.
The first time I run, do not appear any message.
The second time, The message: "Previous request in process. Please try again leter."
And now I have this log on Time Out
Code:
2010-10-21 11:25:45 err=-1, [Microsoft][ODBC SQL Server Driver]Time out, SQL STATE: HYT00, NATIVE ERROR: 0 (0x0)
2010-10-21 11:25:45 SaveGiftPointItem 25 GMA-Goddess qerr=100, {? = call [usp_Save_User_NCash](7,36,'B1_Exthmr2000')}
I think we're very close to the solution. :thumbup:
think that this deadlock event. Where it is shared access to data in the database.
Look in the log file again. Sharing can be tracked using the tool Profiler
Finding and troubleshooting SQL Server deadlocks
If this does not return to its original state stored procedure. Probably an error there.
-
Re: What to put in @GroupName
It worked!
I read your tips again and did modifying below.
I do not quite understand the action, but it worked.
Thank you for the wonderful help.
Code:
USE [PS_GameData]
GO
/****** Object: StoredProcedure [dbo].[procRequestOrderProductByGame] Script Date: 10/22/2010 09:08:04 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[procRequestOrderProductByGame]
@buyClientUserNumber BIGINT,
@receiveClientUserNumber BIGINT,
@itemCode VARCHAR(50),
@resultCode SMALLINT OUTPUT,
@cashBalanceAfterOrder INT OUTPUT,
@orderNumber INT OUTPUT
AS
SET @resultCode = 0
RETURN @resultCode
:blushing:
-
Re: What to put in @GroupName
I have this error twilight'' no item located it that spot''.. can you help me?
MY SP
Code:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
/*==================================================
@author lenasoft
@date 2006-09-22
@return @Ret
0 = 성공
1 = 해당서버에 케릭터명이 존재하지 않음.
2 = 같은 개정임
3 = 아이템 보유수량 초과(포인트개정슬롯 꽉참)
4 = 슬롯부족(아이템을 추가할수 없음)
5 = 인서트 오류
6 = 상품테이블 데이타오류(해당 상품코드 존재하지 않음)
7 = 포인트 차감 실패.
8 = 로그기록 실패.
10= 포인트부족
@brief 유저에게 포인트아이템을 선물한다.
==================================================*/
ALTER Proc [dbo].[usp_Save_User_GiftPointItems_NCash]
@TargetUserID int output,
@TargetCharName varchar(30),
@ProductCode varchar(20),
@BuyUserUID int,
@BuyCharID int,
@UsePoint int,
@UseDate datetime,
@BuyUserID varchar(30)
AS
SET NOCOUNT ON
--SET XACT_ABORT ON
DECLARE @SlotCnt int
DECLARE @SlotMax int
DECLARE @SlotUse int
DECLARE @I int
DECLARE @J int
DECLARE @StrItemID varchar(20)
DECLARE @StrItemCount varchar(20)
DECLARE @Query nvarchar(1000)
DECLARE @ItemID int
DECLARE @ItemCount tinyint
DECLARE @Ret int
-----------------------------------------------
--DECLARE @UserUID int
DECLARE @UseType int
--DECLARE @OrderNumber int
--DECLARE @RemainPoint int
SET @UseType = 2 --선물
SET @TargetUserID = 0
-----------------------------------------------
SET @Ret = 0
SET @SlotMax = 240
SELECT @TargetUserID = UserUID FROM Chars WHERE CharName = @TargetCharName AND Del = 0
IF( @TargetUserID = 0 OR @TargetUserID IS NULL )
BEGIN
-- 해당서버에 케릭터명이 존재하지 않음.
SET @Ret = 1
RETURN @Ret
END
IF( @TargetUserID = @BuyUserUID )
BEGIN
-- 같은 개정임
SET @Ret = 2
RETURN @Ret
END
BEGIN TRANSACTION
CREATE TABLE #SlotList( SlotNum int NOT NULL )
CREATE TABLE #InsertSlotList( SlotNum tinyint NOT NULL, ItemID int NOT NULL, ItemCount tinyint NOT NULL)
INSERT INTO #SlotList SELECT Slot FROM UserStoredPointItems WHERE UserUID=@TargetUserID ORDER BY Slot
SET @SlotCnt = ( SELECT ISNULL(COUNT(*),0) FROM #SlotList )
IF( @SlotCnt >= @SlotMax )
BEGIN
-- 아이템 보유수량 초과(포인트개정슬롯 꽉참)
SET @Ret = 3
GOTO ERROR_RETURN
END
SET @I = 1
WHILE( @I <= 24 )
BEGIN
SET @StrItemID = 'ItemID' + CAST( @I AS varchar(5) )
SET @StrItemCount = 'ItemCount' + CAST( @I AS varchar(5) )
SET @Query = 'SELECT @ItemID='+@StrItemID+', @ItemCount='+@StrItemCount+' FROM PS_DEFINEDB.PS_GameDefs.dbo.ProductList WHERE ProductCode=''' +@ProductCode+''''
EXEC sp_executesql @Query, N'@ItemID int OUTPUT, @ItemCount tinyint OUTPUT', @ItemID OUTPUT, @ItemCount OUTPUT
IF( (@ItemID IS NOT NULL) AND (@ItemCount IS NOT NULL) AND (@ItemID <> 0) )
BEGIN
SET @J = 0
WHILE( @J < @SlotMax )
BEGIN
SET @SlotUse = ( SELECT ISNULL(COUNT(*),0) FROM #SlotList WHERE SlotNum=@J )
IF( @SlotUse = 0 )
BEGIN
INSERT INTO UserStoredPointItems(UserUID,Slot,ItemID,ItemCount) VALUES(@TargetUserID,@J,@ItemID,@ItemCount)
IF( @@ERROR = 0 )
BEGIN
INSERT INTO #SlotList(SlotNum) VALUES(@J)
INSERT INTO #InsertSlotList(SlotNum, ItemID, ItemCount ) VALUES(@J, @ItemID, @ItemCount)
BREAK
END
ELSE
BEGIN
-- 인서트 오류
SET @Ret = 5
GOTO ERROR_RETURN
END
END
SET @J = @J + 1
END
IF( @J >= @SlotMax )
BEGIN
-- 슬롯부족(아이템을 추가할수 없음)
SET @Ret = 4
GOTO ERROR_RETURN
END
END
ELSE IF( @I = 1 )
BEGIN
-- 상품테이블 데이타오류(해당 상품코드 존재하지 않음)
SET @Ret = 6
GOTO ERROR_RETURN
END
SET @I = @I + 1
END
-- Insert Log
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCode,UseDate,TargetName)
VALUES(@UseType,@BuyUserUID,@BuyCharID,@UsePoint,@ProductCode,@UseDate,@TargetCharName)
IF( @@ERROR<>0 )
BEGIN
SET @Ret = 8
GOTO ERROR_RETURN
END
-- Select
SELECT SlotNum, ItemID, ItemCount FROM #InsertSlotList
ERROR_RETURN:
DROP TABLE #SlotList
DROP TABLE #InsertSlotList
IF( @@ERROR = 0 AND @Ret = 0 )
BEGIN
COMMIT TRAN
RETURN 0
END
ELSE
BEGIN
ROLLBACK TRAN
RETURN @Ret
END
SET NOCOUNT OFF
--SET XACT_ABORT OFF
Error:
Code:
2010-10-24 18:24:22 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Could not locate entry in sysdatabases for database 'Billcrux30'. No entry found with that name. Make sure that the name is entered correctly., SQL STATE: 08004, NATIVE ERROR: 911 (0x38F)
2010-10-24 18:24:22 SaveGiftPointItem 9 deadlystrike qerr=100, {? = call [usp_Save_User_NCash](1,2,'PK_remed0002')}
2010-10-24 18:24:47 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Could not locate entry in sysdatabases for database 'Billcrux30'. No entry found with that name. Make sure that the name is entered correctly., SQL STATE: 08004, NATIVE ERROR: 911 (0x38F)
2010-10-24 18:24:47 SaveGiftPointItem 9 deadlystrike qerr=100, {? = call [usp_Save_User_NCash](1,2,'PK_remed0001')}
Thx..
-
1 Attachment(s)
Re: What to put in @GroupName
1. Create a database named Billcrux30
2. Follow these steps
Quote:
Originally Posted by
Twilight
So..
Step 1
execute two SQL command
Code:
sp_configure 'allow updates', 1
reconfigure with override
Step 2
Delete manual PS_Ncash linked server
Step 3
open SQLQueryNcash_Linked.sql
and change login and pass..if need and save
Step 4
execute SQLQueryNcash_Linked.sql
3. Run the scripts (attach)
-
Re: What to put in @GroupName
doesn't work bro.. same problem ''No item located on that spot''
-
Re: What to put in @GroupName
-
Re: What to put in @GroupName
-
Re: What to put in @GroupName
Rename items,skills,mobs,npc:
problems in names with 's
example
Legendary Fuma's Tooth -> rename Legendary Fumas Tooth
and others name..
-
[offtopic]
Twilight, Do you have a online.php script?
An script that shows online users? :O
If so, could you share? :P
-
Re: [offtopic]
Quote:
Originally Posted by
Josue1996143
Twilight, Do you have a online.php script?
An script that shows online users? :O
If so, could you share? :P
Login
-
Re: What to put in @GroupName
Oki thx twilight.. Um is there anyway you can create Login Php scritp? exemple like you need to log in to download client etc..i tried but no luck :(
-
Re: What to put in @GroupName
Quote:
Originally Posted by
antiviru5
Oki thx twilight.. Um is there anyway you can create Login Php scritp? exemple like you need to log in to download client etc..i tried but no luck :(
I think any free CMS aka joomla..or other free cms
-
Re: What to put in @GroupName
That one isn't working tho..
-
Re: What to put in @GroupName
It just ... in the table char to create a column named LoginStatus (with default value - 0)
In this field, the stored procedure writes one - online or 0 - offline.
The script reads the current values
http://www.***********.de/forum/shai...rs-online.html
-
Re: What to put in @GroupName
Download the file SQLQueryNcash_Linked.rar and follow the four steps above. Should work.
Check also the question of the PRC.
I heated the head for two days. :$:
-
Re: What to put in @GroupName
Hi twilight is there any sql query to fix this? becoz there is alot of items will be great if i can get query for that .. :D just too lazy to look 2000+ items..
Code:
Rename items,skills,mobs,npc:
problems in names with 's
example
Legendary Fuma's Tooth -> rename Legendary Fumas Tooth
and others name.
-
Re: What to put in @GroupName
-- Lazy Search
Code:
--Items
USE PS_GameDefs;
GO
SELECT * FROM Items WHERE (ItemName = 'Long Sword');
Code:
USE PS_GameDefs;
GO
--Skills
SELECT * FROM Skills WHERE (SkillName = 'NeedSkillName');
Code:
--Mobs
USE PS_GameDefs;
GO
SELECT * FROM Mobs WHERE (MobName = 'NeedMobName');
OR SQL LIKE
SQL LIKE - SQL Tutorial
Code:
USE PS_GameDefs;
GO
SELECT * FROM Items WHERE (ItemName LIKE 'Legendary Fuma%');
-
Re: What to put in @GroupName
i do know this code but still 1 by1 :D