Jump to content
MakeWebGames

-BRAIDZ-

Members
  • Posts

    403
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by -BRAIDZ-

  1. QUERY ERROR: Unknown column 'mail_new' in 'field list' Query was UPDATE `users` SET `mail_new` = `mail_new` +1 WHERE `userid` = 60
  2. Thanks I understand now, will try it out shortly
  3. So like this? $db->query("UPDATE users SET mail_new=mail_new+1 WHERE userid=$i"); And would I change it from UPDATE to INSERT INTO?
  4. I'm getting an error message $db->query("UPDATE users SET mail_new=mail_new+1 WHERE userid=$userid"); on this line
  5. [MENTION=53425]Magictallguy[/MENTION] how should I have the mail_new query? Is it correct, or should it be different?
  6.   $i=$db->insert_id(); $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10, 5)"); $db->query("UPDATE users SET mail_new=mail_new+1 WHERE userid=$userid"); $db->query("INSERT INTO `mail` (`mail_read`,`mail_from`,`mail_to`,`mail_time`,`mail_subject`,`mail_text`) VALUES (0, 1, ". $i .", unix_timestamp(), 'Welcome To The Game', 'Welcome to Game Name Here, if you need any help with anything please do not hesitate to message an admin, we are here to help! Please accept our welcome package Click <a href=bonus.php>Here!</a> to collect your free welcome pack.')"); I noticed I needed to add into users that they have an unread mail, will this do? Or remove the user ID part? [MENTION=65371]sniko[/MENTION] ?
  7. Still nothing. I haven't changed anything in my sglobals.php file. So I don't know what's going on. This is really starting to tick me off
  8. True, but I really don't have the money to afford a better engine or a custom engine at the moment. If I was good at coding I'd code my own game haha
  9. Thanks mate I replied
  10. No errors displayed. Still just a blank white screen.. This is annoying me. Unfortunately I am using Ravan's but it's virtually the same as mccodes 2, and all other v2 mods work for me..
  11. No I don't think it is, I'm just copying and pasting it to my cpanel file manager code editor
  12. And still nothing. Bugger knows what's wrong
  13. Still returning a blank screen. Might just scrap the mod to be honest, can't seem to get it.working and I suck at coding haha
  14. Still returning a blank page
  15. This modification is for Ravan, not McCodes.   staff_business.php: <?php require_once __DIR__ . '/sglobals.php'; if ($ir['user_level'] > 2) error("Access denied"); if(!function_exists('error')) { function error($msg) { global $h; echo "<strong>ERROR</strong>".$msg; exit($h->endpage()); } } $_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? $_GET['action'] : null; switch ($_GET['action']) { case "addclass": addClass($db); break; default: error("You didn't specify a valid action"); break; } function addClass($db) { echo "<div class='generalinfo_txt'> <div><img src='images/info_left.jpg' alt='' /></div> <div class='info_mid'><h2 style='padding-top:10px;'> Staff Business Management </h2></div> <div><img src='images/info_right.jpg' alt='' /></div> </div> <div class='generalinfo_simple'><br> <br><br>" ?><h3>Business Management: Add Class</h3><?php if(!array_key_exists('submit', $_POST)) { ?><form action='staff_business.php?action=addclass' method='post'> <table class='table' width='75%'> <tr> <th width='25%'>Name</th> <td width='75%'><input type='text' name='name' required /></td> </tr> <tr> <th>Minimum members</th> <td><input type='number' name='members' placeholder='3' required /></td> </tr> <tr> <th>Description</th> <td><textarea name='desc' rows='2' cols='24' required></textarea></td> </tr> <tr> <th>Cost to start</th> <td><input type='number' name='cost' placeholder='100,000' required /></td> </tr> <tr> <td colspan='2' class='center'><input type='submit' name='submit' value='Add Business Class' /></td> </tr> </table> </form><?php } else { $strs = array('name', 'desc'); foreach($strs as $what) { $_POST[$what] = array_key_exists($what, $_POST) && is_string($_POST[$what]) ? $db->escape(trim($_POST[$what])) : null; if(empty($_POST[$what])) error("You didn't enter a valid ".($what == 'desc' ? 'description' : $what)); } $nums = array('members', 'cost'); foreach($nums as $what) { $_POST[$what] = array_key_exists($what, $_POST) && ctype_digit(str_replace(',', '', $_POST[$what])) ? str_replace(',', '', $_POST[$what]) : null; if(empty($_POST[$what])) error("You didn't enter a valid ".($what == 'members' ? 'amount of ' : '').$what); } $select = $db->query("SELECT classId FROM businesses_classes WHERE className = '".$_POST['name']."'"); if($db->num_rows($select)) error("A business class with that name already exists"); $db->query("INSERT INTO businesses_classes (className, classDesc, classMembers, classCost) VALUES ('".$_POST['name']."', '".$_POST['desc']."', ".$_POST['members'].", ".$_POST['cost'].")"); stafflog_add("Added business class: ".stripslashes(htmlspecialchars($_POST['name']))); ?>You've added the business class: <?php echo stripslashes(htmlspecialchars($_POST['name'])); } } $h->endpage();   Now add this into your smenu.php file: <a href="staff_business.php?action=addclass">Create a Business Class</a>   I would like to say thank you to [MENTION=65371]sniko[/MENTION] and [MENTION=53425]Magictallguy[/MENTION] who helped me get this mod working properly. I made the original code, but I will no longer take full credit for the mod. Thank you guys, I appreciate it :)
  16. I will, thank you
  17. Added, thanks
  18. This is why I was telling you.... Sorry using my phone and it's being a pain, was meant for non Stop
  19. I dont have a lib folder?
  20. Okay thanks, I will have to have a look
  21. Yeah true, it wwouldn't insert into my database unless I executed the way i displayed here, except I changed the commas to ; and away it went. Now when I added "clubbing.php" - "club.php" was returning as a blank page, only showing the header.. What could be causing this
  22. Last comment before mine was about 2 and a half years ago. I noticed no one fixed it up for them. And I could see what the problem was, and also I'm putting this in my game just making a few small edits
  23. what about the time?
  24. Should the sql be? ALTER TABLE `users` ADD `traveltime` INT(11) NOT NULL DEFAULT '0', ALTER TABLE `users` ADD `club` INT(11) NOT NULL DEFAULT '0', ALTER TABLE `users` ADD `popularity` INT(11) NOT NULL DEFAULT '0', ALTER TABLE `users` ADD `dare` INT(11) NOT NULL DEFAULT '5', ALTER TABLE `users` ADD `alcohol` INT(11) NOT NULL DEFAULT '0', ALTER TABLE `users` ADD `clubvisits` INT(11) NOT NULL DEFAULT '0';
  25. Try this: ALTER TABLE `users` ADD `traveltime` INT(11) NOT NULL DEFAULT '0', ALTER TABLE `users` ADD `club` INT(11) NOT NULL DEFAULT '0', ALTER TABLE `users` ADD `popularity` INT(11) NOT NULL DEFAULT '0', ALTER TABLE `users` ADD `dare` INT(11) NOT NULL DEFAULT '5', ALTER TABLE `users` ADD `alcohol` INT(11) NOT NULL DEFAULT '0', ALTER TABLE `users` ADD `clubvisits` INT(11) NOT NULL DEFAULT '0';
×
×
  • Create New...