Jump to content
MakeWebGames

Item market problem


stevenrfc

Recommended Posts

Hello

:)

When i add an item to the item market no matter what currency i select it always adds as the second currency which is Gold bars.

imadd.php

       echo '
Adding an item to the item market...
<form action="index.php" method="get">
' . gen_url('imadd', 'hidden')
               . '
	<input type="hidden" name="ID" value="' . $_GET['ID']
               . '" />
<br>
	Quantity: <input type="text" name="QTY" value="">
<br>
	Price: <input type="text" name="price" value="0" />
<br>
<select name="currency" type="dropdown">
	<option value="main">' . $set['main_currency']
               . '</option>
	<option value="second">' . $set['second_currency']
               . '</option>
</select>
<br />
	<input type="submit" value="Add" />
</form>
  ';

 

I don't get it, it says for the first option the value is main, but it still adds it as the second currency instead of money.

Also when i try to buy them it says

"Error, you do not have the funds to buy this item.

> Back"

Even when i clearly have more than enough money and bars to buy the item.

Does anyone know what the problem is?

Thank you.

Link to comment
Share on other sites

Yeah I've tried the support ticket, i have another problem that im trying to fix atm too. They took 9 days for the first reply.

Redux is full of problems and what makes me more annoyed is that the support system is just as bad.

Redux would be much better if it actually does whats on the tin. Theres problems everywhere you go.

I was going to buy v3 but this is just put me off lmao

 

*
*/


if (!defined($_CONFIG['define_code']))
{
   echo 'This file cannot be accessed directly.';
   exit;
}

$_GET['ID'] =
       (isset($_GET['ID']) && is_numeric($_GET['ID']))
               ? abs(intval($_GET['ID'])) : '';
$_GET['price'] =
       (isset($_GET['price']) && is_numeric($_GET['price']))
               ? abs(intval($_GET['price'])) : '';
$_GET['QTY'] =
       (isset($_GET['QTY']) && is_numeric($_GET['QTY']))
               ? abs(intval($_GET['QTY'])) : '';
$_GET['currency'] =
       (isset($_GET['currency'])
               && in_array($_GET['currency'], array('main', 'second')))
               ? $_GET['currency'] : 'main';
if ($_GET['price'] && $_GET['QTY'] && $_GET['ID'])
{
   $q =
           $db->query(
                   "SELECT iv.`inv_qty`, `inv_itemid`, `inv_id`, i.`itmname` FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE inv_id={$_GET['ID']} and inv_userid=$userid");
   if ($db->num_rows($q) == 0)
   {
       echo "Invalid Item ID";
   }
   else
   {
       $r = $db->fetch_row($q);

       if ($r['inv_qty'] < $_GET['QTY'])
       {
           echo 'You do not have enough of this item.';
           $h->endpage();
           exit;
       }
       $checkq =
               $db->query(
                       'SELECT `imID` FROM `itemmarket` WHERE `imITEM` = '
                               . $r['inv_itemid'] . ' AND `imPRICE` = "'
                               . $_GET['price'] . '" AND `imADDER` = '
                               . $userid . ' AND `imCURRENCY` = "'
                               . $_GET['currency'] . '"');
       if ($db->num_rows($checkq))
       {
           $cqty = $db->fetch_row($checkq);
           $query =
                   sprintf(
                           'UPDATE `itemmarket` SET imQTY = imQTY + %u WHERE imID = %u',
                           $_GET['QTY'], $cqty['imID']);
           $db->query($query);
       }
       else
       {
           $db->query(
                   "INSERT INTO itemmarket VALUES ('','{$r['inv_itemid']}',$userid,{$_GET['price']}, '{$_GET['currency']}', '{$_GET['QTY']}')");
       }
       item_remove($userid, $r['inv_itemid'], $_GET['QTY']);
       $db->query(
               "INSERT INTO imarketaddlogs VALUES ( '', {$r['inv_itemid']}, {$_GET['price']}, {$r['inv_id']}, $userid, unix_timestamp(), '{$ir['username']} added {$r['itmname']} x{$_GET['QTY']} to the itemmarket for {$_GET['price']} {$_GET['currency']}')");
       echo "Item added to market.";
   }
}
else
{
   if (empty($_GET['ID']))
   {
       echo 'A error occured, please go back and try again.';
       die($h->endpage());
   }
   $q =
           $db->query(
                   "SELECT `inv_id` FROM `inventory` WHERE `inv_id` = {$_GET['ID']} AND `inv_userid` = $userid");
   if ($db->num_rows($q) == 0)
   {
       echo 'Invalid Item ID';
   }
   else
   {
       echo '
Adding an item to the item market...
<form action="index.php" method="get">
' . gen_url('imadd', 'hidden')
               . '
	<input type="hidden" name="ID" value="' . $_GET['ID']
               . '" />
<br>
	Quantity: <input type="text" name="QTY" value="">
<br>
	Price: <input type="text" name="price" value="0" />
<br>
<select name="currency" type="dropdown">
	<option value="main">' . $set['main_currency']
               . '</option>
	<option value="second">' . $set['second_currency']
               . '</option>
</select>
<br />
	<input type="submit" value="Add" />
</form>
  ';
   }
}
$h->endpage();

Link to comment
Share on other sites

Oh i wouldnt know im new to php, lmao but im trying to learn on PHP academy :P

 

Well looking at the code its never going to work.

The currency doesnt get entered into the database for starters.

Seriously?

Thats probably why it says i cant purchase items of the market.

Its really starting to Look like i paid $120 for half of a game engine.

:|

Link to comment
Share on other sites

You expect v3 to be totally different? And btw... don't wait too much on V3... I doubt they will succeed to reach their deadlines. So if you have something by the end of the year be happy.

*I expected.

Dont worry I'm not waiting on it ;) thats what i was saying it my post

Link to comment
Share on other sites

I swear they said this was fixed(I know, I know). Are you using the most updated version?

Yes mate I've got the latest verison. :/

Its honestly ridiculous. Check this here are all the other problems too. (Please note that i havent edited any of this code, its what i got when i bought it)

*Jobs

- I cant see what title i am.

- I can't add ranks via staff panel

- I click promote and i can get promoted even though theres nothing t get promoted too and i can do this as much times as possible.

*Item markets

- When i add items it always adds as the second currency.

- I cannot buy any items even though i have more than plenty to purchase the item.

*Creating Users

- I cant create users "A Critical Error has occurred, and this page cannot be displayed. Please try again later.

Query failed

*Adding forums

- I can't seem to add forums.

*Adding crimes

- It works now and then, most of the time i have to put everything in, put crystals, money reward too then edit it in PMA.

*Adding battle bots

- Can't seem to do this either.

*Polls are broke

- Just doesnt work.

My friend has a slightly older version of redux and mines is the most updated, yet mines is the most buggy...

I cant express how disappointed i am.

Edited by stevenrfc
typo
Link to comment
Share on other sites

Yes mate I've got the latest verison. :/

Its honestly ridiculous. Check this here are all the other problems too. (Please note that i havent edited any of this code, its what i got when i bought it)

*Jobs

- I cant see what title i am.

- I can't add ranks via staff panel

- I click promote and i can get promoted even though theres nothing t get promoted too and i can do this as much times as possible.

*Item markets

- When i add items it always adds as the second currency.

- I cannot buy any items even though i have more than plenty to purchase the item.

*Creating Users

- I cant create users "A Critical Error has occurred, and this page cannot be displayed. Please try again later.

Query failed

*Adding forums

- I can't seem to add forums.

*Adding crimes

- It works now and then, most of the time i have to put everything in, put crystals, money reward too then edit it in PMA.

*Adding battle bots

- Can't seem to do this either.

*Polls are fucked

- Just doesnt work.

My friend has a slightly older version of redux and mines is the most updated, yet mines is the most buggy...

I cant express how disappointed i am.

Exactly why I started with V1. With all the complaints around here, I saw no reason to pay top dollar for busted goods.

Then, when they made V1 free, and I got my free V2 license, I gutted everything I needed out of V2 and popped it into V1.

From what I've seen, V1 is still preferable to work with out of the three. Just my opinion, though.

Link to comment
Share on other sites

Exactly why I started with V1. With all the complaints around here, I saw no reason to pay top dollar for busted goods.

Then, when they made V1 free, and I got my free V2 license, I gutted everything I needed out of V2 and popped it into V1.

From what I've seen, V1 is still preferable to work with out of the three. Just my opinion, though.

Probably the smartest idea

But i didn't think redux would be rubbish.

Link to comment
Share on other sites

Yes mate I've got the latest verison. :/

Its honestly ridiculous. Check this here are all the other problems too. (Please note that i havent edited any of this code, its what i got when i bought it)

My friend has a slightly older version of redux and mines is the most updated, yet mines is the most buggy...

I cant express how disappointed i am.

I'm sorry to hear that. I would suggest their support if you haven't already tried it. I just pointed out your post in IRC to ColdBlooded so he has at least seen it.

Link to comment
Share on other sites

Steven, Could you do me a favour send me a PM detailing all the issues your having and i will personally go through redux and find them for you also include any inputs your including.

Thank you for your time and patience with this matter i have been sick lately and personally answer any issues with the Redux engine.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...