Jump to content
MakeWebGames

Curt

Members
  • Posts

    525
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Curt

  1. I dont think i understand fully what you mean ? So what your saying is...if someone posts a item for 100 points/crystals and at the time of posting the points average value is say 100$ per point... Then 3 weeks later points value will be 250$...your saying the posted market price should raise too ? I think this should be the sellers responsibility personally :P But it is an interesting thought ;)   Thanks everyone for positive replies :D
  2. imadd.php <?php require "globals.php"; $_POST['ID'] = abs((int) $_POST['ID']); $_POST['iqty'] = abs((int) $_POST['iqty']); $_POST['imoney'] = abs((float) $_POST['imoney']); $_POST['ipoints'] = abs((int) $_POST['ipoints']); echo' <div class="gray-block"> <div class="heading"> Add Item to Market </div>'; if($ir['marketquota']==5) { die("You already met your quota of 5 items on the market remove an item or wait until you sell one."); } if($_POST['iqty']) { if ($_POST['imoney'] AND $_POST['ipoints']) { $PTSMNY="Money and Points"; } else if ($_POST['imoney']) { $PTSMNY="Money"; } else if ($_POST['ipoints']) { $PTSMNY="Points"; } $q=mysql_query("SELECT iv.*,i.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE inv_id={$_POST['ID']} and inv_userid=$userid",$c); if(mysql_num_rows($q)==0) { print "Invalid Item ID"; } $r=mysql_fetch_array($q); if($r['inv_lent'] > 0) { die("This item still belongs to your gang, you can't sell it."); } else if ($r['inv_qty']<$_POST['iqty']) { echo "You do not have that much to add!"; } else { $STACK=$db->query("SELECT * FROM itemmarket WHERE imITEM={$r['itmid']} AND imPRICE={$_POST['imoney']} AND imPOINTS={$_POST['ipoints']} AND imADDER={$ir['userid']}"); if ($db->num_rows($STACK)) { $im=$db->fetch_row($STACK); $db->query("UPDATE itemmarket SET imQTY=imQTY+{$_POST['iqty']} WHERE imADDER=$userid"); } else { mysql_query("INSERT INTO itemmarket VALUES ('','{$r['inv_itemid']}',$userid,{$_POST['imoney']},'$PTSMNY','{$_POST['ipoints']}','{$_POST['iqty']}')", $c); } mysql_query("UPDATE inventory SET inv_qty=inv_qty-{$_POST['iqty']} WHERE inv_id={$_POST['ID']} AND inv_userid=$userid",$c); mysql_query("DELETE FROM inventory WHERE inv_qty=0", $c); mysql_query("INSERT INTO imarketaddlogs VALUES ( '', {$r['inv_itemid']}, {$_POST['imoney']}, {$r['inv_id']}, $userid, unix_timestamp(), '{$ir['username']} added [x{$_POST['iqty']}] {$r['itmname']} to the itemmarket for \${$_POST['imoney']} and {$_POST['ipoints']}.')", $c); print "[x{$_POST['iqty']}] {$r['itmname']}'s added to market for \${$_POST['imoney']} and {$_POST['ipoints']} Points each. [url='inventory.php'] Back to Inventory [/url]"; } } else { $q=mysql_query("SELECT i.inv_itemid,i.inv_qty,it.itmname FROM inventory i LEFT JOIN items it ON i.inv_itemid=it.itmid WHERE inv_id={$_GET['ID']} and inv_userid=$userid",$c); if(mysql_num_rows($q)==0) { print "Invalid Item ID"; } else { $r=mysql_fetch_array($q); print "Adding {$r['itmname']}'s to the item market, you have [x{$r['inv_qty']}]... <form action='imadd.php' method='POST'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> Quanity: <input type='text' name='iqty' value='{$r['inv_qty']}' /> Money: <input type='text' name='imoney' value='0' /> Points: <input type='text' name='ipoints' value='0' /> <input type='submit' value='Add' /></form>"; } } echo "</div>"; $h->endpage(); ?>   Hope some of you will find it useful :)
  3. I have modified a version of Lithium's Item Market mod. Original Post and mod can be found here : [mccode 1.x & 2.x] Item market I did not create this feature from scratch, I simply modified Lithium's version to include the following features: - SHOWS ONLY ITEMS ON MARKET - ITEM QUANTITY - SAME PRICE ITEMS BY SAME USER STACKS - SELL ITEMS FOR MONEY AND/OR POINTS I did develop this feature to use with my new game BushidoBattle.com so you will see that crystals are called points...but the database query's still reference crystals from the database... Any problems post them and I will see about fixing them...as of it works good for me on my offline server :) Here ya go enjoy and big thanks to Lithium for creating most of it :P SQL ENTRIES - Two additions to the itemmarket table - one for points and one for quanity ALTER TABLE `itemmarket` ADD `imPOINTS` INT( 11 ) NOT NULL DEFAULT '0' ; ALTER TABLE `itemmarket` ADD `imQTY` INT( 11 ) NOT NULL DEFAULT '1' ;   itemmarket.php <?php /* itemmarket.php by Lithium MODIFIED BY CURT distribution/selling/sharing of this file is illegal without permission. */ include "globals.php"; echo'<div class="gray-block"> <div class="heading">Item Market</div>'; function quote_smart($value) { if (get_magic_quotes_gpc()) { $value = stripslashes($value); } if (!is_numeric($value)) { $value = "'" . mysql_real_escape_string($value) . "'"; } return $value; } function item_mremove() { global $ir,$c,$userid,$h; $q = mysql_query("SELECT im.*,i.* FROM `itemmarket` `im` LEFT JOIN `items` `i` ON `im`.`imITEM` = `i`.`itmid` WHERE `imID` = '{$_GET['ID']}' AND `imADDER` = $userid"); if(!mysql_num_rows($q)) { ?> Error, either this item does not exist, or you are not the owner. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } $r = mysql_fetch_array($q); if ($r['imQTY']>1) { if (isset($_POST['rqty'])) { $_POST['rqty']=abs((int)$_POST['rqty']); if ($r['imQTY']<$_POST['rqty']) { ?> Error, you do not have this many to remove!. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } else { mysql_query("UPDATE `itemmarket` SET `imQTY`=`imQTY`-{$_POST['rqty']} WHERE `imID`={$_GET['ID']} AND `imADDER`={$ir['userid']}",$c); mysql_query("DELETE FROM `itemmarket` WHERE `imQTY`=0",$c); item_add($userid, $r['itmid'], $_POST['rqty']); ?> Item's Removed from Market! [url="itemmarket.php"]Go Back[/url] <? } } else { ?> How many <?=$r['itmname']?>'s would you like to remove ? <form action='' method='POST'><input type='hidden' name='imID' value=<?=$r['imID']?> > Quanity: <input type='text' size=4 name='rqty' value=<?=$r['imQTY']?>> <input type='submit' value='Remove Items'></form> <? } } else { item_add($userid, $r['imITEM'], 1); mysql_query("DELETE FROM `itemmarket` WHERE `imID`={$_GET['ID']}",$c); mysql_query("INSERT INTO `imremovelogs` VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} removed a {$r['itmname']} from the item market.')", $c); ?> Item removed from market! [url="itemmarket.php"]Go Back[/url] <? } } function item_buy() { global $ir,$c,$userid,$h; $q = mysql_query("SELECT * FROM `itemmarket` `im` LEFT JOIN `items` `i` ON `i`.`itmid` = `im`.`imITEM` WHERE `imID` = {$_GET['ID']}"); if(!mysql_num_rows($q)) { ?> Error, either this item does not exist, or it has already been bought. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } $r = mysql_fetch_array($q); if ($r['imQTY']>1) { if (isset($_POST['buyqty'])) { $_POST['buyqty']=abs((int)$_POST['buyqty']); $_POST['imID']=abs((int)$_POST['imID']); $PRICE=$r['imPRICE']*$_POST['buyqty']; $POINTS=$r['imPOINTS']*$_POST['buyqty']; if($r['imQTY'] < $_POST['buyqty']) { ?> Error, you have selected more items than there really is. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } if($PRICE > $ir['money']) { ?> Error, you do not have the funds to buy this item. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } if($POINTS > $ir['crystals']) { ?> Error, you do not have the funds to buy this item. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } $i=0; item_add($userid, $r['imITEM'], $_POST['buyqty']); mysql_query("UPDATE itemmarket SET imQTY=imQTY-{$_POST['buyqty']} WHERE imID={$_GET['ID']}",$c); mysql_query("DELETE FROM itemmarket WHERE imQTY=0",$c); mysql_query("UPDATE users SET money=money-$PRICE, crystals=crystals-$POINTS WHERE userid=$userid",$c); mysql_query("UPDATE users SET money=money+$PRICE, crystals=crystals+$POINTS WHERE userid={$r['imADDER']}",$c); event_add($r['imADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought [x{$_POST['buyqty']}] {$r['itmname']}'s from the market for \$".number_format($PRICE)." and $POINTS Points!.",$c); mysql_query("INSERT INTO imbuylogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imPRICE']}, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \$$PRICE and $POINTS Points from user ID {$r['imADDER']}')", $c); ?> You bought [x<?=$_POST['buyqty']?>] <?=$r['itmname']?>'s from the market for $<?=number_format($PRICE)?> and <?=$POINTS?> Points!. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } else { ?> How many <?=$r['itmname']?>'s do you want to buy ? There is [x<?=$r['imQTY']?>] available. They cost $<?=number_format($r['imPRICE'])?> and <?=$r['imPOINTS']?> Points Each! <form action='' method='POST'><input type='hidden' name='imID' value=<?=$r['imID']?>> How Many ? <input type='text' size=4 name='buyqty' value='0'> <input type='submit' value='Buy Items'></form> <? } } else { if($r['imPRICE'] > $ir['money']) { ?> Error, you do not have the funds to buy this item. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } if($r['imPOINTS'] > $ir['crystals']) { ?> Error, you do not have the funds to buy this item. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } mysql_query("INSERT INTO inventory VALUES('',{$r['imITEM']},$userid,1)",$c) or die(mysql_error()); $i=mysql_insert_id($c); mysql_query("DELETE FROM itemmarket WHERE imID={$_GET['ID']}",$c); mysql_query("UPDATE users SET money=money-{$r['imPRICE']} where userid=$userid",$c); mysql_query("UPDATE users SET money=money+{$r['imPRICE']} where userid={$r['imADDER']}",$c); event_add($r['imADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['itmname']} item from the market for \$".number_format($r['imPRICE']).".",$c); mysql_query("INSERT INTO imbuylogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imPRICE']}, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \${$r['imPRICE']} from user ID {$r['imADDER']}')", $c); ?> You bought the <?=$r['itmname']?> from the market for $<?=number_format($r['imPRICE'])?>. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } } function item_gift1() { global $ir,$c,$userid,$h; $q=mysql_query("SELECT * FROM itemmarket im LEFT JOIN items i ON i.itmid=im.imITEM WHERE imID={$_GET['ID']}",$c); if(!mysql_num_rows($q)) { ?> Error, either this item does not exist, or it has already been bought. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } $r=mysql_fetch_array($q); if($r['imPRICE'] > $ir['money']) { ?> You do not have the funds to buy this item. [url="itemmarket.php"]Go Back[/url] <? $h->endpage(); exit; } ?> Buying [x<?=$r['imQTY']?>] [b]<?=$r['itmname']?>'s[/b] for $<?=number_format($r['imPRICE'])?> and <?=$r['imPOINTS']?> Points each as a gift for... <form action="itemmarket.php?action=gift2" method="post"> <input type="hidden" name="ID" value="<?=$_GET['ID']?>" /> User to give gift to: <?=user_dropdown($c,'user')?> How many to buy ? <input type='text' size=4 name='giftqty' value=0> <input type="submit" value="Buy Item and Send Gift" /> </form> <? } function item_gift2() { global $ir,$c,$userid,$h; $_POST['giftqty']=abs((int)$_POST['giftqty']); $q=mysql_query("SELECT * FROM itemmarket im LEFT JOIN items i ON i.itmid=im.imITEM WHERE imID={$_POST['ID']}",$c); if(!mysql_num_rows($q)) { ?> Error, either this item does not exist, or it has already been bought. [url='itemmarket.php']> Back[/url] <? $h->endpage(); exit; } $qqq=mysql_query("SELECT username FROM users WHERE userid={$_POST['user']}",$c); if(!mysql_num_rows($qqq)) { ?> Error, this person does not exist. [url='itemmarket.php']> Back[/url] <? $h->endpage(); exit; } $r=mysql_fetch_array($q); $MONEY=$r['imPRICE']*$_POST['giftqty']; $POINTS=$r['imPOINTS']*$_POST['giftqty']; $_POST['user']=abs((int)$_POST['user']); if($r['imQTY'] < $_POST['giftqty']) { ?> Error, you have selected more items than there is! [url='itemmarket.php']Go Back[/url] <? $h->endpage(); exit; } if($MONEY > $ir['money']) { ?> Error, you do not have the funds to buy this item. [url='itemmarket.php']Go Back[/url] <? $h->endpage(); exit; } if($POINTS > $ir['crystals']) { ?> Error, you do not have the funds to buy this item. [url='itemmarket.php']Go Back[/url] <? $h->endpage(); exit; } item_add($_POST['user'], $r['imITEM'], $_POST['giftqty']); mysql_query("UPDATE itemmarket SET imQTY=imQTY-{$_POST['giftqty']} WHERE imID={$_GET['ID']}",$c); mysql_query("DELETE FROM itemmarket WHERE imQTY=0",$c); mysql_query("UPDATE users SET money=money-$MONEY, crystals=crystals-$POINTS where userid=$userid",$c); mysql_query("UPDATE users SET money=money+$MONEY, crystals=crystals-$POINTS where userid={$r['imADDER']}",$c); event_add($r['imADDER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought [x{$_POST['giftqty']}] {$r['itmname']}'s from the market for \$".number_format($MONEY)." and $POINTS Points.",$c); event_add($_POST['user'], "[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought you [x{$_POST['giftqty']}] {$r['itmname']}'s from the item market as a gift.",$c); $u=mysql_query("SELECT * FROM users WHERE userid={$_POST['user']}",$c); $uname=mysql_result($u,0,1); mysql_query("INSERT INTO imbuylogs VALUES ('', {$r['imITEM']}, {$r['imADDER']}, $userid, {$r['imPRICE']}, {$r['imID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['itmname']} from the item market for \$$MONEY and $POINTS Points from user ID {$r['imADDER']} as a gift for $uname [{$_POST['user']}]')", $c); ?> You bought [x<?=$_POST['giftqty']?>] <?=$r['itmname']?>'s from the market for $<?=number_format($MONEY)?> and <?=$POINTS?> Points and sent the gift to <?=$uname?>! <? } /* check which items are valid to use edit $invalid_ids to suit your needs each array placed here won't be listed (category ID on db) */ $invalid_ids = array('8','9','10','999','1000'); $q = "SELECT itmtypeid,itmtypename FROM itemtypes"; $q1 = "SELECT DISTINCT im.imITEM , i.itmid, i.itmtype,i.itmname FROM items i LEFT JOIN itemmarket im ON i.itmid=im.imITEM"; if(is_array($invalid_ids) && !empty($invalid_ids)) { $q.=" WHERE itmtypeid NOT IN ("; $q1.=" WHERE i.itmid=im.imITEM AND i.itmtype NOT IN ("; $count = count($invalid_ids); for($i=0; $i< $count;$i++) { $i_v .= "'".$invalid_ids[$i]."'"; if($i < $count-1) $i_v .= ","; } $q.= $i_v.")"; $q1.= $i_v.")"; } $q.= " ORDER BY itmtypeid"; $q1.= " ORDER BY i.itmtype"; $x = mysql_query($q,$c); while($xx = mysql_fetch_array($x)) { $title_item[$xx['itmtypeid']] = $xx['itmtypename']; $a[$xx['itmtypeid']][] = array(); } $x = mysql_query($q1,$c); while($xx = mysql_fetch_array($x)) { $a[$xx['itmtype']][] = $xx; } ?> <table width="100%" class="inner"> <tr class="fill"> <td colspan=3 class="inner">Item Market <form id="form" name="form" method="post" action="<?=$_SERVER['PHP_SELF']?>"></td> </tr> <tr> <td colspan=3 class="inner"> Select the item type you want to buy from the dropdown boxes. If there is any item fro sale it will show you the links to it.</td> </tr> <tr> <td> <? $i=0; foreach ($a as $key => $value) { $xx = $value; $i++; ?> <table width="100%" class="inner"> <tr class="fill"> <td class="inner"><?=$title_item[$key]?></td> </tr> <tr> <td class="inner"> <select name="s_<?=$key?>" id="s_<?=$key?>"> <option value="0"></option> <option value="-1">Check All</option> <? if(is_array($xx)){ foreach($xx as $x) { if(!empty($x)) { ?> <option value="<?=$x['itmid']?>"> <? echo $x['itmname'];?> </option> <?} } }?> </select> </td> </tr> </table> <? if( $i > 0 && $i < 3) { ?> </td> <td> <? } else { $i = 0; ?> <tr> <td> <? } } for($j=$i;$j > 0; $j--) { ?> </td><td> <? } ?> </td> </tr> <tr class="fill"> <td colspan=3 class="inner"> <input type="submit" name="search" id="search" value="Search" /> </td> </tr> </table> </form> <? switch($_GET['action']) { case "buy": item_buy(); break; case "gift1": item_gift1(); break; case "gift2": item_gift2(); break; case "remove": item_mremove(); break; } if(isset($_POST) && isset($_POST['search'])) { foreach($_POST as $key => $value) { if(preg_match("/^s_(\d*)$/", $key, $match)) { if($value == -1) { $a_it[]= quote_smart($match[1]); } else if($value != 0 && $value != -1) { $a_id[]= quote_smart($value); } } } $sql_get ="SELECT DISTINCT username, userid, itmid, itmname, imPRICE,imPOINTS,imQTY, imID, imADDER FROM itemmarket LEFT JOIN items ON items.itmid = itemmarket.imITEM LEFT JOIN itemtypes ON itemtypes.itmtypeid = items.itmtype LEFT JOIN users ON users.userid = itemmarket.imADDER "; if(isset($a_id) || isset($a_it)) { $sql_get.= "WHERE "; } else { ?> No items found. Please try some other search option! <? $h->endpage(); exit; } if(isset($a_id) && is_array($a_id) && !empty($a_id)) { $count = count($a_id); for($i=0; $i < $count; $i++) { $sql_get.= "itmid = '".$a_id[$i]."' "; if($i < $count - 1) $sql_get.= "OR "; } } if(isset($a_it) && is_array($a_it) && !empty($a_it)) { if(isset($a_id)) $sql_get.= "OR "; $count = count($a_it); for($i=0; $i < $count; $i++) { $sql_get.= "itmtype = '".$a_it[$i]."' "; if($i < $count - 1) $sql_get.= "OR "; } } $sql_get.= " ORDER BY imPRICE ASC"; $q=mysql_query($sql_get); if(!mysql_num_rows($q)) { ?> No items found. Please try some other search option! <? $h->endpage(); exit; } else { ?> <table width="100%" class="inner"> <tr class="fill"> <td colspan="4" class="inner">Your search returned the following results</td> </tr> <tr> <td width="20%" class="inner">Adder</td> <td width="5%" class="inner">Qty</td> <td width="25%" class="inner">Item</td> <td width="20%" class="inner">Money</td> <td width="10%" class="inner">Points</td> <td width="20%" class="inner">Links</td> </tr> <? $lt=""; while($r=mysql_fetch_array($q)) { if($r['imADDER'] == $userid) { $link = "[[url='itemmarket.php?action=remove&ID={$r[']Remove[/url]]"; } else { $link = "[[url='itemmarket.php?action=buy&ID={$r[']Buy[/url]] [[url='itemmarket.php?action=gift1&ID={$r[']Gift[/url]]"; } ?> <tr> <td class="inner">[url='viewuser.php?u=<?=$r[']'><?=$r['username']?>[/url] [<?=$r['userid']?>]</td> <td class="inner"><?=$r['imQTY']?></td> <td class="inner"><?=$r['itmname']?></td> <td class="inner">$<?=number_format($r['imPRICE'])?></td> <td class="inner"><?=number_format($r['imPOINTS'])?></td> <td class="inner">[[url="iteminfo.php?ID=<?=$r['itmid']?>"]Info[/url]]<?=$link?></td> </tr> <?}?> </table> <? } } echo "</div>"; $h->endpage(); ?>   Next post will be the imadd.php page as it needed to be edited aswell...
  4. I have finished modifying this feature... Im going to post a new topic with link to original and regards to Lithium :)
  5. lol...danny was that you in the beginning talking to the creator ?   popular post...such a simple mod...lol
  6. when i first joined the forums i spent a few days going through all the free mod pages....from page 1 to the end...lol.. some old posts are really useful... So the issue is about "bumping" old topics ? lol.... bumping an old topic/mod could bring interest back to the mod...but there are you do get your pointless bumps as Dominion said...lol I personally have no issue at all with old posts being bumped... :thumbsup:
  7. Hey Lithium, If ya dont mind im going to have a crack at adding the suggestions from Nicholas.. I already have it so it shows only the items that are on the market ;) Ill post it here when im done if you say its ok :)
  8. Nice mod :) Im gonna try this out shortly... Also Nicholas, that is some good improvements suggested for this mod :)
  9. Curt

    Game need made

    Hey, I see you posted in the MCCODES area so Im assuming you are planning to use that engine ?... Also if you want a complete game made then you should have a nice budget available as it will take some time to do the work... Good Luck with your project :)
  10. Hey, If you want to erase all players and get the increment to reset simply truncate the table....or you could empty the table from cpanel... This will erase all data but it will start the count from 1 again... You will have to make a new account though as there will be 0 Accounts :P do it to the users table and the userstats table :)
  11. do that and also if you are not homeless and currently have a house, if the awake is more than your other houses then it will not show the houses...
  12. search for textarea in the script and edit the rows='10' and cols='80' to your likings..change these numbers and see how it affects your the page... I would also suggest w3schools.com to teach you some basics of PHP as this is a very basic problem :) Happy Holidays, Curt
  13. lol...dont delete your entire database... simply drop the announcements table and run the SQL again.
  14. I agree with Dominion also I dont see how adding a donation mod and messing around in the database will change the layout of your staff file ?...unless you had to actually install something from the donators mod to your staff file ?...such as maybe an edit/create/delete donator pack maybe... any way, if it is paid, the mod creator would be you best choice :)
  15. two free host I know about are : byethost.com and freehostia.com - they support mccodes as i used them but since they are FREE they dont run cron jobs...if you have cash for paid hosting steer away from these free hosts.... I have heard good things about W3theory but I dont personally use them as a host. You are looking to spend roughly 13-14$ for one month hosting and a domain name. domainname = 9.99/year host= cheap as 2.99/month Good luck with your project :)
  16. no problem :) happy to help you.
  17. Nice mod :) Also about your comment about tabbing. When I first started I did not use tabs...i did not see why i would need to but after coding numerous features for my game I have realized how special tabbing can actually be. If the script is relatively small, then tabbing is not of much use tbh but when the script begins to be pretty large then tabbing would be a good method to use. Tabbing simply allows you to sift through code and recognize regions of the code with greater ease.. I personally use tabbing for code between functions so i can easily tell where one function ends and the next begins... also its good to use tabbing on code in between brackets..   if (this=example) { // TAB all code within this echo "THIS IS AN EXAMPLE!"; if (1=1) { echo "this is another exampled"; } }   With the method above you can easily recognize what code is between what brackets. This extremely helpful when there is a lot of code in between the brackets. Everyone has there own method of tabbing i guess...this is simply mine... Its also not bad to add comments in the script as well... The entire point of tabbing/comments is so that you or someone else can easily look through the script and make necessary changes... Hope that helps you understand about tabbing and when its appropriate to use them :) Happy Holidays, Curt EDIT: Well my example did not come out perfect but hopefully you get the idea :)
  18. lol...I am the exact same about my scripts. Good luck with your project :)
  19. thanks for this post :) You just gave me an idea to improve my current credit system. I have it set up where you can only get credits by donating. One credit = 1$. But the idea i have is where players can earn "Cents" which will convert to 1 credit once you get 100 cents :P The people who are unable to donate will love this :)
  20. lol...everyone has there noob moments... create hospreason in your users table and all will be fine. happy holidays, Curt
  21. hey, check your database and check if hospreason has been changed or if its blank... if its blank you may need to edit the scripts that change that field.
  22. hey, did you remember to put curl in front of the link to your cron job ?
  23. It should work fine :)
  24. Usually when you upgrade your service from free to paid the host will assist you with moving your website to the new service.
  25. I use Hostgator... Support is great and I have had no problems with my games on their servers... byethost sucked for me....i was on a VPS and at least once a week the server would go offline and would require me to manually reset it... sometimes it would go offline right after i would go to sleep, so game would be offline for atleast 8 hours.. I have been hosted with Hostgator for a few months now and everything is great :thumbsup:
×
×
  • Create New...