No announcement yet.

tune.php help

  • Filter
  • Time
  • Show
Clear All
new posts

  • tune.php help

    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<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";
    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</td></tr>
    <tr><td>Speed</td> <td>Lv{$r['cpcSPDLV']} ($spd)</td> <td>{$costf['spd']}</td> <td>Tune</td></tr>
     <tr> <td>Handling</td> <td>Lv{$r['cpcHANLV']} ($han)</td> <td>{$costf['han']}</td> <td>Tune</td></tr>
     <tr> <td>Shield</td> <td>Lv{$r['cpcSHDLV']} ($shd)</td>  <td>{$costf['shd']}</td> <td>Tune</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

  • #2
    Re: tune.php help

    Legit version?


    • #3
      Re: tune.php help

      Then the code is trying to call a function [ power() ] but is unable to find it.
      [tabmenu][tab='About Me'] Hello,
      My name is scott. I have been a member of "Make Web Games"/"PHP=Games"/"Criminal-Existence for over 3 years. In this time i have left for a few periods of time, my longest being January 2009 until i returned February 2010. When i signed up to this site it was originally called Criminal-Existence so if you hear me refer to this site as CE that will be the reason. When i first joined, i knew nothing, zilch, nada about coding.
      [progressbar=93,#00cc00]Xvon[/progressbar][tab='My Mods (5)'] Version 1
      Updated Help Tutorial
      Updated friends and black lists
      Version 2
      Updated mailbox
      Updated friends and black lists
      Updated preferences[/tabmenu]


      • #4
        Re: tune.php help

        i still get an error on line 9


        • #5
          Re: tune.php help

          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
          Need a mod for your game? I do work that is second to none. PM me for further details or click on my banner to view my website.