Jump to content
MakeWebGames

IsaacP

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by IsaacP

  1. ok I'm gonna post the code so you guys can maybe help that way, maybe with the code and the error it'll help so here it is Warning: session_start() [function.session-start]: open(/tmp/sess_e40a3631e39cebf89cf6d2f4b2fb88a2, O_RDWR) failed: Permission denied (13) in /home/gangstal/public_html/globals.php on line 6 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/gangstal/public_html/globals.php:6) in /home/gangstal/public_html/globals.php on line 6 Warning: Cannot modify header information - headers already sent by (output started at /home/gangstal/public_html/globals.php:6) in /home/gangstal/public_html/globals.php on line 21 Warning: Unknown: open(/tmp/sess_e40a3631e39cebf89cf6d2f4b2fb88a2, O_RDWR) failed: Permission denied (13) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0   <?php /*--------------------------------- -- MCCodes 2.0 -- By Dabomstew ---------------------------------*/ session_start(); ob_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "global_func.php"; if($_SESSION['loggedin']==0) { ("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $domain=$_SERVER['HTTP_HOST']; global $jobquery, $housequery; if($jobquery) { $is=$db->query("SELECT u.*,us.*,j.*,jr.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON jr.jrID=u.jobrank WHERE u.userid=$userid"); } else if($housequery) { $is=$db->query("SELECT u.*,us.*,h.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE u.userid=$userid"); } else { $is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid"); } $ir=$db->fetch_row($is); if($ir['force_logout']) { $db->query("UPDATE users SET force_logout=0 WHERE userid=$userid"); session_unset(); session_destroy(); header("Location: login.php"); exit; } global $macropage; if($macropage && !$ir['verified'] && $set['validate_on']==1) { header("Location: macro1.php?refer=$macropage"); exit; } check_level(); $h = new headers; $h->startheaders(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); global $atkpage; if($atkpage) { $h->userdata($ir,$lv,$fm,$cm,0); } else { $h->userdata($ir,$lv,$fm,$cm); } global $menuhide; if(!$menuhide) { $h->menuarea(); } ?>   also I don't know what file unknown is??
  2. ok well I can't figure out whats wrong with my game, it's probably something really simple but I can't figure it out. Here is the error that it gives, maybe you guys can help   Warning: session_start() [function.session-start]: open(/tmp/sess_e40a3631e39cebf89cf6d2f4b2fb88a2, O_RDWR) failed: Permission denied (13) in /home/gangstal/public_html/globals.php on line 6 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/gangstal/public_html/globals.php:6) in /home/gangstal/public_html/globals.php on line 6 Warning: Cannot modify header information - headers already sent by (output started at /home/gangstal/public_html/globals.php:6) in /home/gangstal/public_html/globals.php on line 21 Warning: Unknown: open(/tmp/sess_e40a3631e39cebf89cf6d2f4b2fb88a2, O_RDWR) failed: Permission denied (13) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
  3. can someone make a mod for creating houses with a minimum level? like say I have a trailor and it has a will of 150 and I want the minimum level to buy it at 15, can someone help with this?
  4. damn, I don't even seem to notice the obvious, thanks for helping
  5. Explore the Streets QUERY ERROR: Unknown column 'jailreason' in 'field list' Query was UPDATE `users` SET `jail` = '50', `jailreason` ='Trying to rob a bank.' WHERE `userid` = 1 ok this is the error
  6. this is the full code I'm using   <?php /* EXPLORE THE STREETS CREATED BY: Lithium ~ 03/01/2010 UPDATED BY: Curt ~ 08/03/2011 This feature is 100% free. Enjoy. */ include(DIRNAME(__FILE__) ."/globals.php"); ?> <table cellpadding="4" style="width: 415px; margin-top: 20px;" align="center"> <tr> <td style="background-image: url('images/gradbg.gif'); background-repeat: no-repeat;"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="401" style="background-image: url('images/newsbarhead.gif');" colspan="2" height="20" align="center"> <span class="title">Explore the Streets</span> </td> </tr> <tr> <td colspan="2" class="newspost"> <?php if(!$ir['street_turns']) { echo "You can't explore anymore today!"; $h->endpage(); exit; } if($ir['hospital']) { echo "You can't explore while injured."; $h->endpage(); exit; } if($ir['jail']) { echo"You can't explore while in jail."; $h->endpage(); exit; } $l = $db->query("SELECT * FROM `streets` WHERE (`location` = '{$ir['location']}' OR `location` = '0') ORDER BY RAND() LIMIT 1"); if($_GET['step'] == 'explore') { $db->query("UPDATE `users` SET `street_turns` = `street_turns` - '1' WHERE `userid` = $userid"); $ir['street_turns']-=1; if($db->num_rows($l)) { $step = mysql_fetch_assoc($l); $str = $step['reward']; @eval("\$str = $str;"); if ($step['reward_type'] == 'hospital') { $db->query("UPDATE `users` SET `hp` = '1', `hospital` = '{$str}', `hospreason` = '{$step['reason']}' WHERE `userid` = $userid"); } else if ($step['reward_type'] == 'jail') { $db->query("UPDATE `users` SET `jail` = '{$str}', `jailreason` ='{$step['reason']}' WHERE `userid` = $userid"); } else if ($step['reward_type'] == 'item') { item_add($userid, $str, 1); } else if ($step['reward_type'] == 'robbed') { if ($ir['money']<$str) { $str=$ir['money']; } rand(5,20)*$ir['level']; $db->query("UPDATE `users` SET `money` = `money` - '$str' WHERE `userid` = $userid"); if ($ir['crystals']<$str) { $str=$ir['crystals']; } rand(5,20)*$ir['level']; $db->query("UPDATE `users` SET `crystals` = `crystals` - '$str' WHERE `userid` = $userid"); } else if ($step['reward_type'] == 'nothing') {} else { $db->query("UPDATE `users` SET `".$step['reward_type']."` = `".$step['reward_type']."` + '$str' WHERE `userid` = $userid"); } $what = array('{money}','{crystals}','{hospital}','{jail}' ,'{nothing}','{item}','{robbed}','{exp}'); $for = is_numeric($str) ? number_format($str) : $str; echo str_replace($what, $for, stripslashes(htmlspecialchars($step['text']))); } ?> <a href="streets.php?step=explore">Continue Exploring</a> <a href="index.php">Back Home</a> You have <?php echo $ir['street_turns']; ?> turns left. <?php } else { ?> <a href="streets.php?step=explore">Explore The City</a> You have <?php echo $ir['street_turns']; ?> turns left. <?php } ?> </td> </tr> </table> </td> </tr> </table> <?php $h->endpage(); ?>
  7. that wasn't the error though, it's still not working
  8. my streets gives me an error with this query and won't put the person in jail   else if ($step['reward_type'] == 'jail') { $db->query("UPDATE `users` SET `jail` = '{$str}', `jailreason ='{$step['reason']}' WHERE `userid` = $userid");
  9. thanks so much! that fixed it right up. I'm a dunce lol
  10. I have no clue, as I said I don't know whats wrong with it
  11. <?php include "globals.php"; print "<h3>Equipped Items</h3><hr />"; while($r=$db->fetch_row($q)) { $equip[$r['itmid']]=$r; } print "<table width='75%' cellspacing='1' class='table'> <tr> <th>Primary Weapon</th> <td>"; if($equip[$ir['equip_primary']]['itmid']) { print $equip[$ir['equip_primary']]['itmname']."</td><td><a href='unequip.php?type=equip_primary'>Unequip Item</a></td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Secondary Weapon</th> <td>"; if($equip[$ir['equip_secondary']]['itmid']) { print $equip[$ir['equip_secondary']]['itmname']."</td><td><a href='unequip.php?type=equip_secondary'>Unequip Item</a></td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Armor</th> <td>"; if($equip[$ir['equip_armor']]['itmid']) { print $equip[$ir['equip_armor']]['itmname']."</td><td><a href='unequip.php?type=equip_armor'>Unequip Item</a></td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> </table><hr /> <h3>Inventory</h3><hr />"; $inv=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($inv) == 0) { print "<b>You have no items!</b>"; } else { print "<b>Your items are listed below.</b><br /> <table width=100% class=\"table\" border=\"0\" cellspacing=\"1\"> <tr> <td class=\"h\">Item</td> <td class=\"h\">Sell Value</td> <td class=\"h\">Total Sell Value</td> <td class=\"h\">Links</td> </tr>"; $lt=""; while($i=$db->fetch_row($inv)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=4><b>{$lt}</b></td></tr>"; } if($i['weapon']) { $i['itmname']="<font color='red'>*</font>".$i['itmname']; } if($i['armor']) { $i['itmname']="<font color='green'>*</font>".$i['itmname']; } print "<tr><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print " x{$i['inv_qty']}"; } print "</td><td>\${$i['itmsellprice']}</td><td>"; print "$".($i['itmsellprice']*$i['inv_qty']); print "</td><td>[<a href='iteminfo.php?ID={$i['itmid']}'>Info</a>] [<a href='itemsend.php?ID={$i['inv_id']}'>Send</a>] [<a href='itemsell.php?ID={$i['inv_id']}'>Sell</a>] [<a href='imadd.php?ID={$i['inv_id']}'>Add To Market</a>]"; if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { print " [<a href='itemuse.php?ID={$i['inv_id']}'>Use</a>]"; } if($i['weapon']) { print " [<a href='equip_weapon.php?ID={$i['inv_id']}'>Equip as Weapon</a>]"; } if($i['armor']) { print " [<a href='equip_armor.php?ID={$i['inv_id']}'>Equip as Armor</a>]"; } print "</td></tr>"; } print "</table>"; print "<small><b>NB:</b> Items with a small red </small><font color='red'>*</font><small> next to their name can be used as weapons in combat.<br /> Items with a small green </small><font color='green'>*</font><small> next to their name can be used as armor in combat.</small>"; } $h->endpage(); ?>   ok here is my inventory
  12. I need help with my inventory, when you equip an item it doesn't show equipped but you can attack, and players can't unequip the item. help please
×
×
  • Create New...