GregFest Posted December 12, 2011 Share Posted December 12, 2011 Number one error they all dont work but the energy refill, when trying to use ie crystals it says i dont got any <?php /* Engine: MC V2.5 (Redux) File: exchange.php Author: mccodes.com */ if ( !defined($_CONFIG['define_code']) ) { echo 'This file cannot be accessed directly.'; exit; } if(!$_GET['spend']) { echo "Welcome to the exchange!<br /> You have <b>{$ir['second']}</b> ".$set['second_currency'].".<br /> What would you like to spend your ".$set['second_currency']." on?<br /> <br /> <a href='".gen_url('exchange',true)."&spend=refill'>Energy Refill - {$set['ct_refillprice']} ".$set['second_currency']."</a><br /> <a href='".gen_url('exchange',true)."&spend=IQ'>IQ - {$set['ct_iqpercrys']} IQ per ".substr($set['second_currency'], 0, -1)."</a><br /> <a href='".gen_url('exchange',true)."&spend=main'>".$set['main_currency']." - \$".number_format($set['ct_moneypercrys'])." per ".substr($set['second_currency'], 0, -1)."</a><br />"; } else { if($_GET['spend'] == 'refill') { if($ir['second'] <$set['ct_refillprice']) { echo "You don't have enough ".$set['second_currency']."!"; } else if($ir['energy'] == $ir['maxenergy']) { echo "You already have full energy."; } else { $db->query("UPDATE users SET energy=maxenergy,`second` = `second`-{$set['ct_refillprice']} WHERE userid=$userid"); echo "You have paid {$set['ct_refillprice']} ".$set['second_currency']." to refill your energy bar."; } } else if($_GET['spend'] == 'IQ') { echo "Type in the amount of ".$set['second_currency']." you want to swap for IQ.<br /> You have <b>{$ir['second']}</b> ".$set['second_currency'].".<br /> One ".substr($set['second_currency'], 0, -1)." = {$set['ct_iqpercrys']} IQ.<form action='".gen_url('exchange',true)."&spend=IQ2' method='post'><input type='text' name='".$set['second_currency']."' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'IQ2') { $_POST[$set['second_currency']]=(int) $_POST[$set['second_currency']]; if($_POST[$set['second_currency']] <= 0 || $_POST[$set['second_currency']] > $ir['second']) { echo "Error, you either do not have enough ".$set['second_currency']." or did not fill out the form.<br /> <a href='".gen_url('exchange',true)."&spend=IQ'>Back</a>"; } else { $iqgain=$_POST[$set['second_currency']]*$set['ct_iqpercrys']; $db->query("UPDATE users SET `second` = `second`-{$_POST[$set['second_currency']]} WHERE userid=$userid"); $db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid"); echo "You traded {$_POST[$set['second_currency']]} ".$set['second_currency']." for $iqgain IQ."; } } else if($_GET['spend'] == 'main') { echo "Type in the amount of ".$set['second_currency']." you want to swap for ".$set['main_currency'].".<br /> You have <b>{$ir['second']}</b> ".$set['second_currency'].".<br /> One ".substr($set['second_currency'], 0, -1)." = \$".number_format($set['ct_moneypercrys']).".<form action='".gen_url('exchange',true)."&spend=main2' method='post'><input type='text' name='".$set['second_currency']."' /><br /><input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'main2') { $_POST[$set['second_currency']]=(int) $_POST[$set['second_currency']]; if($_POST[$set['second_currency']] <= 0 || $_POST[$set['second_currency']] > $ir['second']) { echo "Error, you either do not have enough ".$set['second_currency']." or did not fill out the form.<br /> <a href='".gen_url('exchange',true)."&spend=main'>Back</a>"; } else { $iqgain=$_POST[$set['second_currency']]*$set['ct_moneypercrys']; $db->query("UPDATE users SET `second` = `second`-{$_POST[$set['second_currency']]},`main` = `main`+$iqgain WHERE userid=$userid"); echo "You traded {$_POST[$set['second_currency']]} ".$set['second_currency']." for \$".number_format($iqgain)."."; } } } $h->endpage(); ?> Quote Link to comment Share on other sites More sharing options...
BeastTheKidd Posted December 12, 2011 Share Posted December 12, 2011 what is `second`? Did you do the mod yourself? Quote Link to comment Share on other sites More sharing options...
GregFest Posted December 12, 2011 Author Share Posted December 12, 2011 no its how redux is set out so basically could be crystals or rubies, Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted December 13, 2011 Share Posted December 13, 2011 I see the redux staff CB, Dabs and Paul have still not replied to this. So much for their new forum presence. Quote Link to comment Share on other sites More sharing options...
GregFest Posted December 13, 2011 Author Share Posted December 13, 2011 i have over 10 problems worked out 3 myself lol, and i have asked mccode support many times. like this one it works use $set['main_currency'] but not $set['second_currency'] Quote Link to comment Share on other sites More sharing options...
sniko Posted December 13, 2011 Share Posted December 13, 2011 like this one it works use $set['main_currency'] but not $set['second_currency'] Go to phpmyadmin > game database > settings > find "second_currency" in conf_name, if it's not in there, add it. Quote Link to comment Share on other sites More sharing options...
GregFest Posted December 13, 2011 Author Share Posted December 13, 2011 Its all there as redux comes like that with main_currency second_currency Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted December 14, 2011 Share Posted December 14, 2011 (edited) Seems to work for me. Reduced my energy to 0 then used whats set as my second currency to refill. Oh and this is the second currency Paul was boasting about isnt it. Well done you made it possible to name the cash and crystal fields in the database which was already there in all previous versions. Edited December 14, 2011 by rulerofzu Quote Link to comment Share on other sites More sharing options...
GregFest Posted December 14, 2011 Author Share Posted December 14, 2011 yeah the refill works but the exchange the ie. crystals for iq or cash part dont just says you dont have any of the follow item even when you have 1000's Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted December 14, 2011 Share Posted December 14, 2011 You traded 150 Points for 750 IQ. Seems to work on the version I have. Whats your url? pm me if you wish. Quote Link to comment Share on other sites More sharing options...
GregFest Posted December 16, 2011 Author Share Posted December 16, 2011 fixed :D thanks rulerofzu for replying to post Quote Link to comment Share on other sites More sharing options...
Uridium Posted December 16, 2011 Share Posted December 16, 2011 << topic resolved closed >> Quote Link to comment Share on other sites More sharing options...
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.