Jump to content
MakeWebGames

sniko

Members
  • Posts

    2,210
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by sniko

  1. Nice concept! Can you define "inactive hosting plans" please?   How much service experience do you have managing servers? Do you manage the server yourself, or do a 3rd party? Do you backup the server contents, and if so, what are your backup methods? If the service has downtime, how quickly can you fix it? Are we allowed to have SSH access? Can we install packages? Ie. PEAR packages? How up-to-date is your technology? Apache/Nginx version PHP version ... Are they the latest version, or the latest stable version? How much of a notice will you give to clients notifying them of an upgrade to a service?  
  2. Sure, but the variable doesn't. I'm done.
  3. And how do I do that? Really? Really?!. Click the blue links. *sigh Also can you see what's going on with my last function? Yes. $itmid doesn't exist. Query the inventory table for the item and check the quantity.
  4. Then use a link and style it like a button. As you're not using any form elements within your form, it seems a little wasted.
  5. I wouldn't.   You will need to cover the cost of your investment (your time) You will need to cover the cost of the "24/7 support"   But hey, it's up to you...
  6. Man.... use your logic! :mad:
  7. Where do you put what exactly? :confused: Look into item_add() or add_item() function in global_func.php (I can't remember the exact function name, but....)   //Maybe this will work //Maybe it won't //I don't know the exact function name or the order of the parameters... item_add($_SESSION['userid'], 277, mt_rand(1,6));
  8.   Can you help me with adding queries please? Give me an example, and tell me where to put it? Not sure what query you want... I only want one sql and that is 'brew' and it will be in the 'users' table. What do you want the query to do? (ie: Update `brew` value to what?) Also, I want it so when you brew you get an item, and set the rand between 1 and 6 or something.. rand() / mt_rand() And also, if you have brewed 10 times in one day, how do I get it so it says "You have already brewed 10 times today, come back tomorrow" Create a new table to record how many times a user has brewed When a user brews insert into said table On page load, calculate the amount of times they've brewed If equal to 10, show the message   $strDbQuery = "SELECT COUNT(id) AS `times_brewed` FROM `users_brew` WHERE `userid`=". $_SESSION['userid']; $resTimesBrewed = $db->query($strDbQuery); if( is_resource($resTimesBrewed) === FALSE ) { //Something went wrong. //Say something to user die; } $arrResults = $db->fetch_row($resTimesBrewed); if($arrResults['times_brewed'] > 10) { echo 'You have already brewed 10 times today, come back tomorrow'; $h->endpage(); die; }   Then in your daily cron, truncate `users_brew` table.
  9. You might want to redo that code :p It's going to error when a case is true because the function will be not defined (because it's still in the switch() and terminated by the break;)   switch( strtolower($_GET['action']) ) { case 'beer': beer(); break; case 'whiskey': whiskey(); break; case 'cider': cider(); break; case 'vodka': vodka(); break; default: exit("Requires and action"); break; } function cider(){ //Code right here } //Define all other functions
  10.   You don't need to start print ""; then end it and start echo ""; to output different text blocks. There is really no PHP, so you could just close the PHP tags on line 4 and output HTML without using PHP You haven't ended the headers (displayed the footer) at the end, ie: $h->endpage(); Your current set-up indicated that types of brewery actions will be hardcoded. See http://makewebgames.io/showthread.php/46088-In-Production-Brewery-Mod?p=311918&viewfull=1#post311918 ( [MENTION=68711]KyleMassacre[/MENTION] )
  11. Static means you can call the property/method without instantiating the object. It's quite handy. See: http://verraes.net/2014/06/when-to-use-static-methods-in-php/
  12. It's a great way to create easily-extendible, organised applications involving the DRY principle. Also, you can have some fun with it ;) https://eval.in/377301
  13. [MENTION=68406]-BRAIDZ-[/MENTION] You will find programming much more practical if you didn't use a mobile editor. Why would you even attempt to program on your phone?! Like wuttttttt.....
  14. I'm game to do some testing :) I'll Skype you later.
  15. 20GBP isn't too expensive for someones time. [MENTION=69823]jcvenom[/MENTION] how flexible are the awards? Ie: Do you have to hardcode the criteria or can you put the awards into a database and they'll get given via cron logic?
  16. Nice! Though, your regex is flawed on line 64+.   Using [A-z] will include all ASCII characters from the range A to z, which isn't intended (I would assume). See ASCII table. [A-z] will allow special characters like [, ], /, ^ - See example You're missing your anchors to match the entire string. For example; ^[A-z]+$   I wouldn't advise building the JSON string manually, either. I would build the array, then use JSON.stringify.
  17. Can you add the following to your first post then? - hopefully it'll clear the confusion. [noparse] This modification is for Raven, not McCodes. [/noparse]
  18. Look into Same origin policy. Note: As the policy name suggests, this will only work with iFrames with the same origin (same domain; ie: sub.domain.com and domain.com can access each others content. It won't work with domain.com and other.com) This StackOverflow thread will be of use to you :)
  19. TFA = The Forbidden Age It was a awesome concept that was being developed by [MENTION=64684]Dayo[/MENTION] and [MENTION=66223]DreamCoder[/MENTION]. Blog entry Forum thread Another forum thread
  20. I was actually really looking forward to TFA, perhaps finish that up if you don't find anything?
  21. Depends.   What issues/errors are you facing? What debugging processes have you adopted? Did you find anything out with debugging? Perhaps a server misconfiguration? When you did this, I don't believe you when you say it didn't bring back anything...     In your original post you have some syntax errors which would be revealed with error reporting. Your code is hideous. Please look into PSR standards You don't need to global in the same scope. Line 9 functions shouldn't really echo/print anything, but return. Line 19 Your query is insecure. Line 61 Escape or change your quotes. This is a syntax error. Line 67 When you submit the form, you aren't going to the logic to process the form. Line 25 You've ended your function too early, I would assume. Line 59 This die(); isn't needed it and should be handled in sglobals.php, IIRC.     Most of these would have been shown to you with error_reporting. I hope now that you understand my frustration with you.
  22. Ugh. I give up trying to help this guy. I tag [MENTION=68711]KyleMassacre[/MENTION], [MENTION=69670]Script47[/MENTION], [MENTION=70347]NonStopCoding[/MENTION] and everyone else in. Goodluck.
  23. Yes, but you'd need extra configuration on the server to get get_browser() to work. [MENTION=70485]G7470[/MENTION] was saying he prefers the other method (ie: not get_browser()). He wasn't saying that it's more reliable in the sense of what it brings back.
  24.   See this.   Have you tried it? What went wrong? Was there an error message? Did you try and debug? If so, what did you do?     The forum software is adding spaces randomly in the code, so here's a mirror
  25. I remember when this thread was about trying to procure a McCodesv2 license. [MENTION=68711]KyleMassacre[/MENTION] can you split this?
×
×
  • Create New...