-
Posts
785 -
Joined
-
Last visited
-
Days Won
79
Content Type
Profiles
Forums
Events
Everything posted by SRB
-
Seriously? Spoon feeding incoming... if ($r['laston'] > (time() - 300)) { echo 'You can not attack people while they are online.'; $h->endpage; exit; } *sigh*
-
How about this Link
-
And this is why I've never joined those sites. Since paypal payments are made to them, who can you really fight?
-
[V2] Inventory changes - Paying £4.61
SRB replied to Dragon Blade's topic in Requests & In Production
He already has the code, but I feel the need to point out that if you don't know how to do it... you're not the right person for the job, surely? -
[V2] Inventory changes - Paying £4.61
SRB replied to Dragon Blade's topic in Requests & In Production
Indeed it does, buddy. I work a full time job, so if something quick comes up in my spare time, I'll turn off the pr0n and do it sometimes :D Guess I like the fact it's £ and not $ too :D -
[V2] Inventory changes - Paying £4.61
SRB replied to Dragon Blade's topic in Requests & In Production
Why £4.61? Random number, right? Inbox me. -
Agree 100%. I always found webhostingtalk to be a good resource and as all the reviews on knownhost are pretty good, I generally use them for a lot of things now. All down to preference and how much knowledge you have on configuring servers etc, as renting a blank box is so much cheaper, but you manage it yourself, right down to installing apache etc.
-
Missing the point still. May not have 20k users now, but who is to say it won't ever have? Emphasis is still on "scalability". Having your answer as the only right one seems to be a habit of yours lately. Think I am going to nickname you Cavell.
-
I think it has a bug. Tell me what the problem is: $cost = 1000; if ($ir['money'] < 999) UPDATE [...] money = money - $cost Also, a few things I dislike: Poor database naming / logically linking tables in future queries Why the need to prefix tables? Naming conventions are not hard to adapt too. Makes programming simpler since you can use the same logic throughout. CREATE TABLE IF NOT EXISTS `guesscode` ( `code_ID` INT(11) PRIMARY KEY AUTO_INCREMENT, `code_ONE` INT(11) default '0', `code_TWO` INT(11) default '0', `code_THREE` INT(11) default'0', `code_JACKPOT` INT(11) default '0', `code_GUESSES` INT(11) default '0' ); CREATE TABLE IF NOT EXISTS `guesscode` ( `id` INT(11) PRIMARY KEY AUTO_INCREMENT, `one` INT(11) unsigned NOT NULL default '0', `two` INT(11) unsigned NOT NULL default '0', `three` INT(11) unsigned NOT NULL default'0', `pot` INT(11) unsigned NOT NULL default '0', `attempts` INT(11) unsigned NOT NULL default '0' ); Looks simpler to work with? I hope so, because it is. It's simple and in this case, simple works. Ever installed a mod where you need to refer to the database multiple times to recall the column naming? Yes, waste of time and avoidable if you start thinking about it right. Cluttering tables with data. I do not understand the need to further clutter an already cluttered field. Is there a point? Since your game is probably pulling all rows (SELECT * FROM), you are slowing down your system by increasing it's size. And assuming you are still using MyISAM, which I assume is being used here since their is no ENGINE added for InnoDB etc, which doesn't do table locking as MyISAM does. ALTER TABLE `users` ADD `codeguess` INT(11) default '0', ADD `codescorrect` INT(11) default '0'; CREATE TABLE IF NOT EXISTS `code_info` ( `id` INT(11) unsigned NOT NULL default '0', `guesses` INT(11) unsigned NOT NULL default '0', `wins` INT(11) unsigned NOT NULL default '0', UNIQUE KEY (id) ); With the above, simply insert the users ID into the database in the ID field, since the row is unique and can't be duplicated. Sure, this requires a couple more queries, but will be more readable and better wrote, in my opinion. That is all
-
I don't think these really matter for a game. I've never cared about Alexa ranking and page rank... with a game, since the names are groups of words, such as "Samurai of legend", you will return top after a while anyway.
-
Try this for starters then research more on how bad PHP really is. It was directed to me - you don't need to know.
-
While the subject is on "What would you have done as a beginner, if you had the chance to restart", my answer is simple: I wouldn't have started with PHP.
-
That would depend if he has just asked to only list 10 (or another number) of items from the database.... he didn't. To limit a player to only have 10 listings, place this is the file where it needs to be (I'll let you do some work yourself!) $sql = "SELECT `imID` FROM `itemmarket` WHERE `imADDER` = '{$ir['userid']}';"; $qry = mysql_query($sql); if (mysql_num_rows($qry) >= 10) { echo 'You can only have 10 listings on the item market at once.'; $h->endpage(); exit; }
-
From: To I wonder if you're right. I'm sure we'll see when the reply comes, although I feel like we'll need another translation at that point too, so stay close by Dom :D Shocking, thought they could translate anything! Sure they have wookie too :D
-
Anybody able to translate from idiot to English?
-
if (strlen(str_replace(" ", "", $pmessage)) > 0) { $db->query("INSERT INTO p_messages(pmc_id, s_id, r_id, message, time) VALUES('$c_id', '$userid', '$fr_id', '$pmessage', NOW())"); new_notification($fr_id, $userid, 2, $c_id); }
-
If clues were cookies... you would be hungry.
-
Why the slash before PDO?
-
Why 70 if you have an 80? Seems backwards.
-
I've personally never had a problem with knownhost, when I've hosted anything I've put online.
-
Yup. Import 0.125|8|100|10|100|10|100|10|100|10|100|10|100|10|100|10|100|10 * 100 of each item down the side, with prices set to 10 cookies. * 2,616, 360 per second
-
Don't like the game anymore -- realised you can edit from the export/import. Fun over.
-
That sucks. On another note, on 5930/s now.
-
Why did you show me this!? Shame on you - I now have 3,264 cookies per second :(
-
Didn't know they had updated. Guess I should venture into change logs more often... ok, I should just go into them, just this once! :P EDIT: When they let me define words to keep, from the stop lists, I'll be happy once more.