[Help] Database issues

10/14/2022 07:54 liulinkan#1
When I added the magic mission, I kept prompting this error!

Prompt:DbManagerFun.cpp, 1210.
Exec RETURN FALSE, ThreadID : 5100.
SQLSTATE:42000 error:[Microsoft][SQL Server Native Client 11.0][SQL Server] error converting from data type varchar to int.

Source: DbManagerFun.cpp
int nEventId,nX,nY,nCount,nDesc,nMagicDay;
char chElem,bLow;
CTime t = CTime::GetCurrentTime();
int nTmpDay = t.GetDay();
char szMagicQuest[1024] = {0,};
qry->GetStr("m_aMagicQuest",szMagicQuest);
if(VerifyString(szMagicQuest,__FILE__,__LINE__,lpD bOverlappedPlus->AccountInfo.szPlayer,NULL) == FALSE)
{
return;
}
CountStr = 0;
while('$' != szMagicQuest[CountStr])
{
nEventId = GetIntPaFromStr( szMagicQuest, &CountStr );
nDesc = GetIntPaFromStr( szMagicQuest, &CountStr );
nCount = GetIntPaFromStr( szMagicQuest, &CountStr );
chElem = (char)GetIntPaFromStr( szMagicQuest, &CountStr );
nX = GetIntPaFromStr( szMagicQuest, &CountStr );
nY = GetIntPaFromStr( szMagicQuest, &CountStr );
bLow = (char)GetIntPaFromStr( szMagicQuest, &CountStr );
nMagicDay = GetIntPaFromStr( szMagicQuest, &CountStr );
CountStr++;
//Error("%d %d %d %d %d %d %d %d [%d/%d]",nEventId,nX,nY,nCount,nDesc,nMagicDay,chElem,bLo w,CountStr,nStrLen);
if( nEventId > 0 && nMagicDay == nTmpDay)
{
CDayEventState* pDES = new CDayEventState;
pDES->SetEventId(nEventId);
CMagicQuest* pMQ = new CMagicQuest;
pMQ->SetCount(nCount);
pMQ->m_nDesc = nDesc;

sMagicPos* pMPos = new sMagicPos;
pMPos->bLow = (bLow == 1 ? true : false);
pMPos->chElem = chElem;
pMPos->nEventId = nEventId;
pMPos->nX = nX;
pMPos->nY = nY;
pMQ->SetMagicPos(pMPos);
pDES->SetMagicQuest(pMQ);
pMover->m_DayEvent.Add(pDES);
}
}

SQL Database:
Table:
m_aMagicQuest varchar(1024) Checked

Stored Procedures:
, @[Only registered and activated users can see links. Click Here To Register...]agicQuest varchar(1024) = '$'
,A.m_aMagicQuest
, m_aMagicQuest = @[Only registered and activated users can see links. Click Here To Register...]agicQuest
Does anyone know how to solve it? Thank you
11/09/2022 15:19 liulinkan#2
New problems:
The pink balloon with +50 attack power has a duration of 3 days when used, but when I log in to the client again, the persistence time becomes 1 hour, does anyone know what caused it? Thank you