Hi Ragezoners.
I have setup my web_mall so that players can buy stuff with dpoints and or Vpoints.
Now i encounterd an strange thing.
I have added 4 more things to the shop.
But if i buy 1 of those stuff they dont appear in my inventory.
Instead its giving me an error
Spoiler:
SendItem::GetSendItem PlayerName = raventh1984, Item_Count = 1 Qry = CHARACTER_STR 'S4',@im_idPlayer='0000001',@iserverindex='01',@iaccount='(null)',@im_szName='(null)',@iplayerslot=0,@idwWorldID=0,@im_dwIndex=0,@im_vPos_x=0.000000,@im_vPos_y=0.000000,@im_vPos_z=0.000000,@im_szCharacterKey='(null)',@im_dwSkinSet=0,@im_dwHairMesh=0,@im_dwHairColor=0,@im_dwHeadMesh=0,@im_dwSex=0,@im_vScale_x=0.000000,@im_dwMotion=0,@im_fAngle=0.000000,@im_nHitPoint=0,@im_nManaPoint=0,@im_nFatiguePoint=0,@im_dwRideItemIdx=0,@im_dwGold=0,@im_nJob=0,@im_pActMover='(null)',@im_nStr=0,@im_nSta=0,@im_nDex=0,@im_nInt=0,@im_nLevel=0,@im_nExp1=0,@im_nExp2=0,@im_aJobSkill='(null)',@im_aLicenseSkill='(null)',@im_aJobLv='(null)',@im_dwExpertLv=0,@im_idMarkingWorld=0,@im_vMarkingPos_x=0.000000,@im_vMarkingPos_y=0.000000,@im_vMarkingPos_z=0.000000,@im_nRemainGP=0,@im_nRemainLP=0,@im_nFlightLv=0,@im_nFxp=0,@im_nTxp=0,@im_lpQuestCntArray='(null)',@im_chAuthority='F',@im_dwMode=0,@im_idparty=0,@im_idMuerderer=0,@im_nFame=0,@im_nDeathExp=0,@im_nDeathLevel=0,@im_dwFlyTime=0,@im_nMessengerState=0,@iTotalPlayTime=0,@im_Card='(null)',@im_Index_Card='(null)',@im_ObjIndex_Card='(null)',@im_Cube='(null)',@im_Index_Cube='(null)',@im_ObjIndex_Cube='(null)',@im_Inventory='(null)',@im_apIndex='(null)',@im_adwEquipment='(null)',@im_dwObjIndex='(null)',@im_aSlotApplet='(null)',@im_aSlotItem='(null)',@im_aSlotQueue='(null)',@im_SkillBar=0,@im_Bank='(null)',@im_apIndex_Bank='(null)',@im_dwObjIndex_Bank='(null)',@im_dwGoldBank=0,@im_nFuel=0,@im_tmAccFuel=0,@im_dwSMTime='(null)',@iSkillInfluence='(null)',@im_aCompleteQuest='(null)',@im_extInventory='(null)',@im_InventoryPiercing='(null)',@im_extBank='(null)',@im_BankPiercing ='(null)',@im_dwReturnWorldID=0,@im_vReturnPos_x=0.000000,@im_vReturnPos_y=0.000000,@im_vReturnPos_z=0.000000,@im_nPKValue=0,@im_dwPKPropensity=0,@im_dwPKExp=0,@im_nAngelExp=0,@im_nAngelLevel=0,@iszInventoryPet='(null)',@iszBankPet='(null)', @im_dwPetId=0,@im_nExpLog=0, @im_nAngelExpLog=0,@im_nCoupon=0,@im_nHonor=-1,@im_nLayer=0,@im_nCampusPoint=0,@im_idCampus=0,@im_aCheckedQuest='(null)'
The rest that i added earlier is working fine.
I even compared it but there is nothing wrong with it.
Its all the same except for the itemID.
The query i use is this one.
Spoiler:
if(isset($_POST['ok'])) //If the user press ok then continue//
{
database("CHARACTER_01_DBF");
$Sql_char = "SELECT * FROM [CHARACTER_TBL] WHERE m_idPlayer = '".mssql_escape_string($_POST['char'])."'";
if(!$res_char = mssql_query($Sql_char))
{
echo 'Error on line 336';
}
else
{
database("WEBSITE_DBF");
$sql_item = "SELECT * FROM [web_mall] WHERE mid = '".mssql_escape_string($_POST['id'])."'";
if(!$res_item = mssql_query($sql_item))
{
echo 'Error on line 345';
}
else
{
$fetch_char = mssql_fetch_assoc($res_char);
$fetch_item = mssql_fetch_assoc($res_item);
database("CHARACTER_01_DBF");
$sql_ins = "INSERT INTO [ITEM_SEND_TBL] (
m_idPlayer,
serverindex,
Item_Name,
Item_count,
m_nAbilityOption,
idSender,
adwItemId0)VALUES(
'".mssql_escape_string($fetch_char['m_idPlayer'])."',
'".mssql_escape_string($fetch_char['serverindex'])."',
'".mssql_escape_string($fetch_item['itemid'])."',
'".mssql_escape_string($fetch_item['count'])."',
'0',
'000000',
'".mssql_escape_string($fetch_item['itemid'])."')";
if(!$query_ins = mssql_query($sql_ins))
{
sqlError('There went something wrong with the connection to the database!<br />We send an automatic email to the owner!');
notify('Probleem met de query:'.mssql_get_last_message().' in shop.php op lijn 50 op datum '.date("Y-m-d").'');
}
else
{
database("ACCOUNT_DBF");
if($fetch_item['category'] == 5)
{
$sql_up = "UPDATE [ACCOUNT_TBL] SET votepoints = votepoints - '".mssql_escape_string($fetch_item['price'])."' WHERE account = '".mssql_escape_string($_SESSION['user'])."'";
if(!$query_up = mssql_query($sql_up))
{
sqlError('There went something wrong with the connection to the database!<br />We send an automatic email to the owner!');
notify('Probleem met de query:'.mssql_get_last_message().' in shop.php op lijn 73 op datum '.date("Y-m-d").'');
}
else
{
database("WEBSITE_DBF");
$sql_log = "INSERT INTO [web_buylogs] (item,account,datetime)VALUES('".mssql_escape_string($fetch_item['itemid'])."','".mssql_escape_string($_SESSION['user'])."','".date('m.d.Y H:i:s')."')";
if(!$res_log = mssql_query($sql_log))
{
echo 'Error on line 388';
}
else
{
echo '<div class="success">You have bought an '.$fetch_item['name'].' for '.$fetch_item['price'].' Please relog to get your item!</div>';
}
}
}
else
{
$sql_up = "UPDATE [ACCOUNT_TBL] SET cash = cash - '".mssql_escape_string($fetch_item['price'])."' WHERE account = '".mssql_escape_string($_SESSION['user'])."'";
if(!$query_up = mssql_query($sql_up))
{
sqlError('There went something wrong with the connection to the database!<br />We send an automatic email to the owner!');
notify('Probleem met de query:'.mssql_get_last_message().' in shop.php op lijn 73 op datum '.date("Y-m-d").'');
}
else
{
database("WEBSITE_DBF");
$sql_log = "INSERT INTO [web_buylogs] (item,account,datetime)VALUES('".mssql_escape_string($fetch_item['itemid'])."','".mssql_escape_string($_SESSION['user'])."','".date('m.d.Y H:i:s')."')";
if(!$res_log = mssql_query($sql_log))
{
echo 'Error on line 388';
}
else
{
echo '<div class="success">You have bought an '.$fetch_item['name'].' for '.$fetch_item['price'].' Please relog to get your item!</div>';
}
}
}
}
}
}
Its working fine on any other item.
Except for the ones i added it as last.
What could be the problem?
