|
You last visited: Today at 14:43
Advertisement
Taxes are not send
Discussion on Taxes are not send within the Flyff Private Server forum part of the Flyff category.
10/25/2016, 16:41
|
#1
|
elite*gold: 0
Join Date: Apr 2011
Posts: 91
Received Thanks: 10
|
Taxes are not send
Hello,
I have a strange problem with Taxes, i don't know why but the SecretRoom winner don't recieve them...
I have a strange error like this :
query:{call MAIL_STR('A1', 26086, '01', '0002523', '0000000', 1039500, 1477398601, 0, ?, ?,0, 0, 0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0, 0,0,0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0, 0, 0, 0,0, 0, 0, 0, 0,0)}
SQLSTATE:22001 error:[Microsoft][SQL Native Client]String data, right truncation
Here is the function associated :
void CTaxDBController::PayTaxToPost()
{
CTax* tax = CTax::GetInstance();
CQuery* pQuery = GetQueryObject();
for( TAXINFOMAP::iterator it=tax->m_mapTaxInfo.begin(); it!=tax->m_mapTaxInfo.end(); it++ )
{
__TAXINFO* taxInfo = it->second;
DWORD dwId = taxInfo->dwId;
if( ( it->first != CONT_ALL ) && ( dwId != NULL_ID ) )
{
char szQuery[QUERY_SIZE] = {0,};
sprintf( szQuery, "TAX_INFO_STR 'S3', '%02d', 0, 0, '%07d', '0', 0, '0'", g_appInfo.dwSys, dwId );
if( pQuery->Exec( szQuery ) )
{
if( pQuery->Fetch() )
dwId = static_cast<DWORD>( pQuery->GetInt( "m_idPlayer" ) <= CQuery::CQUERYNULL ? NULL_ID : pQuery->GetInt( "m_idPlayer" ) );
else
dwId = NULL_ID;
}
else
{
WriteLog( "%s, %d\t%s", __FILE__, __LINE__, szQuery );
dwId = NULL_ID;
}
}
if( dwId == NULL_ID )
continue;
for( TAXDETAILMAP::iterator it2=taxInfo->mapTaxDetail.begin(); it2!=taxInfo->mapTaxDetail.end(); it2++ )
{
__TAXDETAIL* taxDetail = it2->second;
CMail* pMail = new CMail;
pMail->m_tmCreate = ::time_null();
pMail->m_idSender = 0; //
pMail->m_nGold = taxDetail->nTaxGold;
switch( it2->first )
{
case TAX_SALES :
sprintf( pMail->m_szTitle, prj.GetText(TID_GAME_TAX_PAY_SALES_TITLE),
CContinent::GetInstance()->GetContinentName(it->first) );
break;
case TAX_PURCHASE :
sprintf( pMail->m_szTitle, prj.GetText(TID_GAME_TAX_PAY_PURCHASE_TITLE),
CContinent::GetInstance()->GetContinentName(it->first) );
break;
case TAX_ADMISSION :
sprintf( pMail->m_szTitle, prj.GetText(TID_GAME_TAX_PAY_ADMISSION_TITLE),
CContinent::GetInstance()->GetContinentName(it->first) );
break;
} // switch
char strDate[100]={0,};
CTime cTime = CTime::GetCurrentTime() - CTimeSpan( 1, 0, 0, 0 );
sprintf( strDate, prj.GetText( TID_GAME_TAX_PAY_DATE ), cTime.GetYear(), cTime.GetMonth(), cTime.GetDay() );
sprintf( pMail->m_szText, prj.GetText( TID_GAME_TAX_PAY_INFO ), strDate, taxDetail->nTaxCount, taxDetail->nTaxPerin, taxDetail->nTaxGold );
if( taxDetail->nTaxPerin )
{
pMail->m_pItemElem = new CItemElem;
pMail->m_pItemElem->m_dwItemId = II_SYS_SYS_SCR_PERIN;
pMail->m_pItemElem->m_nItemNum = static_cast<short>( taxDetail->nTaxPerin );
pMail->m_pItemElem->SetSerialNumber( xRand() );
}
post::Post( dwId, pMail, pQuery );
taxDetail->nTaxCount = 0;
taxDetail->nTaxGold = 0;
taxDetail->nTaxPerin = 0;
} // for it2
} // for it
}
Maybe you know what's the problem ?
Thanks alot
|
|
|
10/25/2016, 17:06
|
#2
|
elite*gold: 0
Join Date: Jan 2012
Posts: 147
Received Thanks: 24
|
Sorry for the question but weren't you able to find something out through the debug mode?
|
|
|
10/25/2016, 17:32
|
#3
|
elite*gold: 0
Join Date: Apr 2011
Posts: 91
Received Thanks: 10
|
I only debug my Worldserver when it crashes :/
|
|
|
10/26/2016, 04:51
|
#4
|
elite*gold: 0
Join Date: May 2014
Posts: 252
Received Thanks: 58
|
Upload: Resource/Lua/SecreetRoom....
I Check the Source Code later
|
|
|
10/26/2016, 09:10
|
#5
|
elite*gold: 0
Join Date: Oct 2012
Posts: 948
Received Thanks: 157
|
No need for Resource etc.
Its an truncation did you search google what it ment?
Its simple. The data that is inserted is larger then the field allows.
So it has nothing to do with the procedure.
DbManager.cpp
|
|
|
10/26/2016, 10:25
|
#6
|
elite*gold: 0
Join Date: Apr 2011
Posts: 91
Received Thanks: 10
|
Thanks, then what should i do ? Just increase every field size ?
Is there a way to know exactly which data is the truncated one ?
|
|
|
10/26/2016, 12:47
|
#7
|
elite*gold: 0
Join Date: Oct 2012
Posts: 948
Received Thanks: 157
|
Post your MAIL_STR here and your
Code:
void CDbManager::MakeQueryAddMail( char* szSql, CMail* pMail, u_long idReceiver )
so i can compare it to what i have to see if there is something out of the order.
|
|
|
10/26/2016, 13:04
|
#8
|
elite*gold: 0
Join Date: Apr 2011
Posts: 91
Received Thanks: 10
|
void CDbManager::MakeQueryAddMail( char* szSql, CMail* pMail, u_long idReceiver )
{
CItemElem item;
CPet pet;
BOOL bPet = FALSE;
if( pMail->m_pItemElem )
{
item = *pMail->m_pItemElem;
if( pMail->m_pItemElem->m_pPet )
{
pet = *pMail->m_pItemElem->m_pPet;
bPet = TRUE;
}
}
else
item.m_nItemNum = 0;
#if __VER >= 12 // __EXT_PIERCING
if( item.GetProp() && item.GetProp()->IsUltimate() )
{
sprintf( szSql, "{call MAIL_STR('A1', %d, '%02d', '%07d', '%07d', %d, %d, %d, ?, ?,"
"%d, %d, %d, %d, %d, %d, %d, %d,"
"%d, %d, %d, %d, %d, %d, %d,"
"%I64d,"
"%d, %d, %d, %d, %d"
",%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
",%d"
",%d, %d, %d, %d, %d" // 추가 피어싱 아이템
",%d, %d, %d, %d, %d" // 추가 피어싱 아이템
",%d" // 추가 피어싱 사이즈
")}",
pMail->m_nMail, g_appInfo.dwSys, idReceiver, pMail->m_idSender, pMail->m_nGold, pMail->m_tmCreate, pMail->m_byRead,
item.m_dwItemId, item.m_nItemNum, item.m_nRepairNumber, item.m_nHitPoint, item.m_nRepair, 0, item.m_byFlag, item.GetSerialNumber(),
item.GetOption(), item.m_bItemResist, item.m_nResistAbilityOption, item.m_idGuild, item.m_nResistSMItemId, item.m_bCharged, item.m_dwKeepTime,
item.GetRandomOptItemId(),
item.GetUltimatePiercingSize(), item.GetUltimatePiercingItem( 0 ), item.GetUltimatePiercingItem( 1 ), item.GetUltimatePiercingItem( 2 ), item.GetUltimatePiercingItem( 3 ),
bPet, pet.GetKind(), pet.GetLevel(), pet.GetExp(), pet.GetEnergy(), pet.GetLife(),
pet.GetAvailLevel( PL_D ), pet.GetAvailLevel( PL_C ), pet.GetAvailLevel( PL_B ), pet.GetAvailLevel( PL_A ), pet.GetAvailLevel( PL_S )
, item.GetUltimatePiercingItem( 4 )
, item.GetPiercingItem( 0 ), item.GetPiercingItem( 1 ), item.GetPiercingItem( 2 ), item.GetPiercingItem( 3 ), item.GetPiercingItem( 4 )
, item.GetPiercingItem( 5 ), item.GetPiercingItem( 6 ), item.GetPiercingItem( 7 ), item.GetPiercingItem( 8 ), item.GetPiercingItem( 9 )
, item.GetPiercingSize()
);
}
else
{
sprintf( szSql, "{call MAIL_STR('A1', %d, '%02d', '%07d', '%07d', %d, %d, %d, ?, ?,"
"%d, %d, %d, %d, %d, %d, %d, %d,"
"%d, %d, %d, %d, %d, %d, %d,"
"%I64d,"
"%d, %d, %d, %d, %d"
",%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
",%d"
",%d, %d, %d, %d, %d" // 추가 피어싱 아이템
",%d, %d, %d, %d, %d" // 추가 피어싱 아이템
",%d" // 추가 피어싱 사이즈
")}",
pMail->m_nMail, g_appInfo.dwSys, idReceiver, pMail->m_idSender, pMail->m_nGold, pMail->m_tmCreate, pMail->m_byRead,
item.m_dwItemId, item.m_nItemNum, item.m_nRepairNumber, item.m_nHitPoint, item.m_nRepair, 0, item.m_byFlag, item.GetSerialNumber(),
item.GetOption(), item.m_bItemResist, item.m_nResistAbilityOption, item.m_idGuild, item.m_nResistSMItemId, item.m_bCharged, item.m_dwKeepTime,
item.GetRandomOptItemId(),
item.GetPiercingSize(), item.GetPiercingItem( 0 ), item.GetPiercingItem( 1 ), item.GetPiercingItem( 2 ), item.GetPiercingItem( 3 ),
bPet, pet.GetKind(), pet.GetLevel(), pet.GetExp(), pet.GetEnergy(), pet.GetLife(),
pet.GetAvailLevel( PL_D ), pet.GetAvailLevel( PL_C ), pet.GetAvailLevel( PL_B ), pet.GetAvailLevel( PL_A ), pet.GetAvailLevel( PL_S )
, item.GetPiercingItem( 4 )
, item.GetPiercingItem( 5 ), item.GetPiercingItem( 6 ), item.GetPiercingItem( 7 ), item.GetPiercingItem( 8 ), item.GetPiercingItem( 9 )
, 0, 0, 0, 0, 0
, 0
);
}
#else // __EXT_PIERCING
sprintf( szSql, "{call MAIL_STR('A1', %d, '%02d', '%07d', '%07d', %d, %d, %d, ?, ?,"
"%d, %d, %d, %d, %d, %d, %d, %d,"
"%d, %d, %d, %d, %d, %d, %d,"
"%I64d,"
"%d, %d, %d, %d, %d"
",%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d"
",%d"
")}",
pMail->m_nMail, g_appInfo.dwSys, idReceiver, pMail->m_idSender, pMail->m_nGold, pMail->m_tmCreate, pMail->m_byRead,
item.m_dwItemId, item.m_nItemNum, item.m_nRepairNumber, item.m_nHitPoint, item.m_nRepair, 0, item.m_byFlag, item.GetSerialNumber(),
item.GetOption(), item.m_bItemResist, item.m_nResistAbilityOption, item.m_idGuild, item.m_nResistSMItemId, item.m_bCharged, item.m_dwKeepTime,
item.GetRandomOptItemId(),
item.GetPiercingSize(), item.GetPiercingItem( 0 ), item.GetPiercingItem( 1 ), item.GetPiercingItem( 2 ), item.GetPiercingItem( 3 ),
bPet, pet.GetKind(), pet.GetLevel(), pet.GetExp(), pet.GetEnergy(), pet.GetLife(),
pet.GetAvailLevel( PL_D ), pet.GetAvailLevel( PL_C ), pet.GetAvailLevel( PL_B ), pet.GetAvailLevel( PL_A ), pet.GetAvailLevel( PL_S )
,item.GetPiercingItem( 4 )
);
#endif // __EXT_PIERCING
}
STr :
USE [CHARACTER_01_DBF]
GO
/****** Object: StoredProcedure [dbo].[MAIL_STR] Script Date: 26/10/2016 13:04:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[MAIL_STR]
@iGu CHAR(2),
@nMail INT,
@serverindex CHAR(2),
@idReceiver CHAR(7) = '0000000',
@idSender CHAR(7) = '0000000',
@nGold INT = 0,
@  reate INT = 0,
@byRead INT = 0,
@  itle VARCHAR(128) = '', @  xt VARCHAR(1024) = '',
@dwItemId INT = 0,
@nItemNum INT = 0,
@nRepairNumber INT = 0,
@nHitPoint INT = 0,
@nMaxHitPoint INT = 0,
@nMaterial INT = 0,
@byFlag INT = 0,
@dwSerialNumber INT = 0,
@nOption INT = 0,
@bItemResist INT = 0,
@nResistAbilityOption INT = 0,
@idGuild INT = 0,
@nResistSMItemId INT = 0,
@bCharged INT = 0,
@dwKeepTime INT = 0,
@nRandomOptItemId bigINT = 0,
@nPiercedSize INT = 0,
@dwItemId1 INT = 0,
@dwItemId2 INT = 0,
@dwItemId3 INT = 0,
@dwItemId4 INT = 0
------------------- Version9 Pet
,@bPet int = 0,
@nKind int = 0,
@nLevel int = 0,
@dwExp int = 0,
@  gy int = 0, @  fe int = 0,
@anAvailLevel_D int = 0,
@anAvailLevel_C int = 0,
@anAvailLevel_B int = 0,
@anAvailLevel_A int = 0,
@anAvailLevel_S int = 0,
@dwItemId5 int = 0
----------------- Ver. 12
,@dwItemId6 int = 0, @dwItemId7 int = 0, @dwItemId8 int = 0, @dwItemId9 int = 0, @dwItemId10 int = 0
,@dwItemId11 int = 0, @dwItemId12 int = 0, @dwItemId13 int = 0, @dwItemId14 int = 0, @dwItemId15 int = 0
,@nPiercedSize2 int = 0
----------------- Ver. 13
, @szPetName varchar(32) = ''
AS
set nocount on
IF @iGu = 'S1'
BEGIN
SELECT * FROM MAIL_TBL WHERE serverindex = @serverindex AND byRead<90 order by nMail
RETURN
END
ELSE
IF @iGu = 'A1'
BEGIN
INSERT MAIL_TBL
(
nMail,
serverindex,
idReceiver,
idSender,
nGold,
tmCreate,
byRead,
szTitle,
szText,
dwItemId,
nItemNum,
nRepairNumber,
nHitPoint,
nMaxHitPoint,
nMaterial,
byFlag,
dwSerialNumber,
nOption,
bItemResist,
nResistAbilityOption,
idGuild,
nResistSMItemId,
bCharged,
dwKeepTime,
nRandomOptItemId,
nPiercedSize,
dwItemId1,
dwItemId2,
dwItemId3,
dwItemId4,
SendDt
, bPet, nKind, nLevel, dwExp, wEnergy, wLife, anAvailLevel_D, anAvailLevel_C
, anAvailLevel_B, anAvailLevel_A, anAvailLevel_S, dwItemId5
, dwItemId6, dwItemId7, dwItemId8, dwItemId9, dwItemId10, dwItemId11
, dwItemId12, dwItemId13, dwItemId14, dwItemId15, nPiercedSize2
-- Ver. 13
, szPetName
)
VALUES
(
@nMail,
@serverindex,
@idReceiver,
@idSender,
@nGold,
@  reate,
@byRead,
@  itle, @  xt,
@dwItemId,
@nItemNum,
@nRepairNumber,
@nHitPoint,
@nMaxHitPoint,
@nMaterial,
@byFlag,
@dwSerialNumber,
@nOption,
@bItemResist,
@nResistAbilityOption,
@idGuild,
@nResistSMItemId,
@bCharged,
@dwKeepTime,
@nRandomOptItemId,
@nPiercedSize,
@dwItemId1,
@dwItemId2,
@dwItemId3,
@dwItemId4,
getdate()
, @bPet, @nKind, @nLevel, @dwExp, @  gy, @  fe, @anAvailLevel_D, @anAvailLevel_C
, @anAvailLevel_B, @anAvailLevel_A, @anAvailLevel_S ,@dwItemId5
, @dwItemId6, @dwItemId7, @dwItemId8, @dwItemId9, @dwItemId10, @dwItemId11
, @dwItemId12, @dwItemId13, @dwItemId14, @dwItemId15, @nPiercedSize2
-- Ver. 13
, @szPetName
)
RETURN
END
IF @iGu = 'D1'
BEGIN
UPDATE MAIL_TBL SET byRead=90, DeleteDt=getdate() WHERE nMail = @nMail AND serverindex = @serverindex
RETURN
END
IF @iGu = 'D2'
begin
--update MAIL_TBL set byRead=90, DeleteDt=getdate() where serverindex = @serverindex and tmCreate < @  reate
return
end
IF @iGu = 'U1'
BEGIN
UPDATE MAIL_TBL SET
ItemFlag=90, ItemReceiveDt=getdate()
WHERE nMail = @nMail AND serverindex = @serverindex
RETURN
END
IF @iGu = 'U2'
BEGIN
UPDATE MAIL_TBL SET GoldFlag=90, GetGoldDt=getdate() WHERE nMail = @nMail AND serverindex = @serverindex
RETURN
END
IF @iGu = 'U3'
BEGIN
UPDATE MAIL_TBL SET byRead = 1, ReadDt=getdate() WHERE nMail = @nMail AND serverindex = @serverindex
RETURN
END
set nocount off
|
|
|
10/26/2016, 22:50
|
#9
|
elite*gold: 0
Join Date: Oct 2012
Posts: 948
Received Thanks: 157
|
Seems the same.
Thus this only happen with the taxes? You can send gold for yourself to an other player?
Also over 1B?
|
|
|
10/27/2016, 12:20
|
#10
|
elite*gold: 0
Join Date: Apr 2011
Posts: 91
Received Thanks: 10
|
Mmh.. I'll try with 1B.
Edit : It worked with 1B, not Perins but 1b. So maybe there is something else ?
And yes it only happen with the taxes
|
|
|
10/27/2016, 13:07
|
#11
|
elite*gold: 0
Join Date: Oct 2012
Posts: 948
Received Thanks: 157
|
I think its still the gold.
Increase the table nGold from int to bigint. To see if that helps.
|
|
|
10/27/2016, 13:43
|
#12
|
elite*gold: 0
Join Date: Apr 2011
Posts: 91
Received Thanks: 10
|
Ok i'll try that thanks
Edit : Its already a bigint :c
|
|
|
10/27/2016, 14:08
|
#13
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,741
Received Thanks: 1,674
|
It seems that either the Title or the Text is too long for the column.By default, szTitle can take 128 and szText can take up to 255 characters.
Check what length your szText and szTitle columns (in MAIL_TBL) can take and check what your server wants to insert there (maybe with debug output, or some error log output for testing).
|
|
|
10/27/2016, 14:57
|
#14
|
elite*gold: 0
Join Date: Apr 2011
Posts: 91
Received Thanks: 10
|
I changed the szText and szTitle values to varchar(MAX) already, i though it was that but its not :/
|
|
|
10/27/2016, 16:32
|
#15
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,741
Received Thanks: 1,674
|
Quote:
Originally Posted by firesqual
I changed the szText and szTitle values to varchar(MAX) already, i though it was that but its not :/
|
Then it must happen while the quetion marks (?) are being binded to the values.
So check what length pMail->m_szText and pMail->m_szTitle have during runtime.
|
|
|
 |
|
Similar Threads
|
SMC : Fortress War Taxes
09/18/2018 - SRO Private Server - 5 Replies
Hello :
i opened SmC : Schedule Controller : TAX_PERIOD ,
i'm trying to make guilds collect the fortress war taxes every day in the week and in any time , does any one know what is the option and time setting i should chose ? cuz i keep failing
there is 2 options :
01- everyday for ( duration ) from (Start time)
|
[Trading] [H] 5€ Amazon GiftCard [W] 5€ paysafecard! can pay e*gold taxes, i go first
07/03/2016 - Trading - 2 Replies
hello,
iam here to trade my earned amazon giftcard (5€) for a 5€ paysafecard! I will go first if you are trusted enough (atleast 100 tbm´s!!) otherwise i get ma code first :)
iam ok with paying taxes
|
group level limit/taxes in the blackmarket
01/16/2014 - Shaiya PServer Development - 2 Replies
Hey guys I come with another request to you, what I am searching for is for a group level limit which i want to set. I don't know how, where and I have no idea.
Also there are taxes in the blackmarket, anybody have an idea of where I can change them?
|
Created npc and Fortress taxes
10/09/2012 - SRO Private Server - 2 Replies
Hi, how to set npc selling items on fortress war tax system ?
|
[Bug] Taxes
10/20/2008 - Kal Online - 0 Replies
Hey... Well I play on a private server and I am the castle owner... well I had the following thing: When i took taxes, i had my full 2kkk. But when I taked it and put it in storage, i went back and saw it has again 2kkk...
Well after geting the money a few times, i got c/l. Now the taxes are normal... I heared from some guys that they read about this bug and how to use it. Do anyone know of you how to use it?
Would be great!
Thanks
|
All times are GMT +1. The time now is 14:43.
|
|