stevenrfc Posted July 9, 2012 Posted July 9, 2012 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. Quote
rulerofzu Posted July 9, 2012 Posted July 9, 2012 This has been a issue in redux from day 1 and I am pretty sure that they dont provide fixes apart from by support ticket (so nobody else has the fix which is a bit silly if you ask me) Quote
sniko Posted July 9, 2012 Posted July 9, 2012 Mind posting the section where it inserts the entry into the database? I believe the error is there. Quote
stevenrfc Posted July 9, 2012 Author Posted July 9, 2012 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(); Quote
sniko Posted July 9, 2012 Posted July 9, 2012 It's got something to do with the ternary, line 20. But I'd like to question their method for using _GET. From first viewing, it looks fine. Quote
rulerofzu Posted July 9, 2012 Posted July 9, 2012 Well looking at the code its never going to work. The currency doesnt get entered into the database for starters. Quote
stevenrfc Posted July 10, 2012 Author Posted July 10, 2012 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. :| Quote
danger boy Posted July 10, 2012 Posted July 10, 2012 Send in a support ticket. If they take a while to reply, head over to the IRC Chat (chat tab found on top). Coldblooded is mostly in there so try talking to him :) Quote
stevenrfc Posted July 10, 2012 Author Posted July 10, 2012 Send in a support ticket. If they take a while to reply, head over to the IRC Chat (chat tab found on top). Coldblooded is mostly in there so try talking to him :) Okay I'll shove on another one, lmao Thanks I'll try that if they dont reply :) Quote
sniko Posted July 10, 2012 Posted July 10, 2012 Well looking at the code its never going to work. The currency doesnt get entered into the database for starters. Good find! I retract my comment. Quote
rulerofzu Posted July 10, 2012 Posted July 10, 2012 Yeah I apologize to stevenrfc I would fix this up for you but mcc has had enough free support from the community here and as Ian has a bad attitude then its up to them to fix it. Quote
stevenrfc Posted July 10, 2012 Author Posted July 10, 2012 Lol no need to apologise, if anyone its them. V1 is probably less buggy. This is really put me off v3 and im sure other people can say the same :/ Quote
a_bertrand Posted July 10, 2012 Posted July 10, 2012 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. Quote
stevenrfc Posted July 10, 2012 Author Posted July 10, 2012 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 Quote
Dominion Posted July 10, 2012 Posted July 10, 2012 I swear they said this was fixed(I know, I know). Are you using the most updated version? Quote
rulerofzu Posted July 10, 2012 Posted July 10, 2012 Isnt this one of the errors that Paul stated he had fixed but you had to contact them for it. I got the latest file and it does not work. Quote
stevenrfc Posted July 11, 2012 Author Posted July 11, 2012 (edited) 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 July 11, 2012 by stevenrfc typo Quote
Seker Posted July 11, 2012 Posted July 11, 2012 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. Quote
stevenrfc Posted July 11, 2012 Author Posted July 11, 2012 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. Quote
Dominion Posted July 11, 2012 Posted July 11, 2012 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. Quote
stevenrfc Posted July 11, 2012 Author Posted July 11, 2012 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. Thank you :) Yeah i have 2 support tickets up at the moment. Quote
ColdBlooded Posted July 11, 2012 Posted July 11, 2012 Hi Stevenrfc, We are working on this case as we speak. You should hear from us within couple of hours with the fixes. We apologize for any inconvenience. CB. Quote
Paul Evans Posted July 11, 2012 Posted July 11, 2012 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.