View Full Version : tune.php help

03-11-2008, 09:51 PM
im trying to get this v2 code to wrok can anyone help thanks
here is the code

include "globals.php";
print "<h3>Tuning Shop</h3><hr />
> Back To Garage ('garage.php')<hr />";
if(!$_GET['id']) { die("Invalid Usage"); }
$q=mysql_query("SELECT cp.*,ct.* FROM cars_playercars cp LEFT JOIN cars_types ct ON ct.carID=cp.cpcCAR WHERE cp.cpcID={$_GET['id']} AND cp.cpcPLAYER=$userid", $c);
if(mysql_num_rows($q) == 0) { die("Invalid Car"); }
if($_GET['buy'] != "acc" && $_GET['buy'] != "han" && $_GET['buy'] != "spd" && $_GET['buy'] != "shd") { die("Abusers suck."); }
if($ir['money'] < $upgr_cost) { die("You don't have enough money to tune this stat."); }
mysql_query("UPDATE users SET money=money-{$upgr_cost} WHERE userid=$userid", $c);
mysql_query("UPDATE cars_playercars SET $stat=$stat+1 WHERE cpcID={$_GET['id']}", $c);
print "Car tuned!

> Tune some more ('tune.php?id={$_GET[')";
foreach($cost as $k => $v)
print "Current Stats for your {$r['carNAME']}

<table width='90%'><tr> <th>Stat</th> <th>Amount</th> <th>Cost To Tune</th> <th>Tune</th></tr>
<tr> <td>Acceleration</td> <td>Lv{$r['cpcACCLV']} ($acc)</td> <td>{$costf['acc']}</td> <td>Tune ('tune.php?id={$_GET[')</td></tr>
<tr><td>Speed</td> <td>Lv{$r['cpcSPDLV']} ($spd)</td> <td>{$costf['spd']}</td> <td>Tune ('tune.php?id={$_GET[')</td></tr>
<tr> <td>Handling</td> <td>Lv{$r['cpcHANLV']} ($han)</td> <td>{$costf['han']}</td> <td>Tune ('tune.php?id={$_GET[')</td></tr>
<tr> <td>Shield</td> <td>Lv{$r['cpcSHDLV']} ($shd)</td> <td>{$costf['shd']}</td> <td>Tune ('tune.php?id={$_GET[')</td></tr>
and here is the error i get

Fatal error: Call to undefined function power() in /home/avfc1993/public_html/tune.php on line 9

03-11-2008, 09:58 PM
Legit version?

03-11-2008, 10:19 PM
Then the code is trying to call a function [ power() ] but is unable to find it.

03-11-2008, 10:30 PM
i still get an error on line 9

03-12-2008, 11:35 PM
you gotta define the function power

obviously, it isn't a function that is predefined in PHP

where did you get the mod? is it a paid mod, free mod, make it yourself?

we'll need to know what it's supposed to do to help.

or you could contact the person that wrote it