-
Posts
2,210 -
Joined
-
Last visited
-
Days Won
47
Content Type
Profiles
Forums
Events
Everything posted by sniko
-
Proof Publius is still the owner of TheGRPG.
sniko replied to Publius1's topic in General discussions
I don't understand why they let the domain expire if they were so worried about identity. jmtc. -
Wut. rm -rf /* #No don't, really, don't.
-
But it does work, just doesn't functions as desired?
-
Erm. What part are you confused with?
-
Via SSH; chmod 777 <game_folder/> Change <game_folder/> to the directory where you placed your files; probably public_html.
-
I think what !Angel meant was What's your budget?
-
Not bad. A 3 year bump. First post was posted in 2008, it's now 2013. Since then PHP have released ~78 versions/patches which may have included deprecation of functions. Also, since 2008, McCodes has released 8 versions/patches, which although didn't change an awful lot to the core since 2008, we can't make the assumption - without testing extensively - that it does work without any errors, and functionality is correct, can we?
-
iFrames, the leader of the iGeneration. iDevices, transform and roll out. - iFrames, the leader of the web.
-
You need to restart apache
-
Ah, I thought I was on to something, until I got to x=5. 1/sqrt(1+0^0) 2/sqrt(2+1^1) 3/sqrt(3+2^2) 4/sqrt(4+3^3) x / sqrt(x+(x-1)^(x-1))
-
I bid $75.
-
Just because there are 2 outcomes, does not mean the odds of getting one of the two outcomes is 50/50. Seker is correct, by the way. For example, I could adapt what you said, and say everything is 50/50 because it could be outcome A, or outcome B. Imagine it's raining, you're outside, and you say "What's the chance/probability of a single raindrop not landing on me?" I could say (using what you've said) "It's 50/50, because it could happen, or it could not happen.", which is incorrect as you're only taking into account the two outcomes, and not factoring in the variable(s) that dictate an outcome. Let's take the script in question into an interrogation. 200 numbers in the pool, I guess 1, which brings - for arguments sake, my guessed number is correct - the number of incorrect numbers in the pool to 199 (I guessed 1, 200-1 = 199). Now, even though I was correct in my guess, the odds themselves were not 50/50, but more 1/199 - 199 incorrect numbers, 1 correct. I hope that helps you understand it a little better.
-
Why would you need to adopt another language to enable/disable modules? There is plenty of ways/hacks to do it; A database table, like you said. Create a "disabled" file in the module folder Create a "list" of disabled modules in a configuration file Rename the module folder
-
Why not? -tooshort-
-
The file seems fine. Run it manually, see if that makes a change. If so, contact your host to enable your crons (and double-check the cron set-up)
-
By using a clever design pattern. If you harness MVC effectively, you could make an application modular.
-
I'd say give DigitalOcean a go. They're customer service is unprecedented. Here's a screenshot of their services;
-
I don't think you understood what Kyle was saying. Having a parameter in the check_travel function will allow you to check if an attacking opponent is travelling or not. Also, saying what you said; Assumption. The mother of all...
-
Nice. You may have some trouble with your ctype_digit checks. For example, if you run; <?php $array = array("strings" => array("1", "1.2", "abc", "abc1"), "int" => array(1, 2, 1.2) ); echo '<strong>Strings</strong> <ul>'; foreach($array['strings'] as $data) { echo '<li>'. (ctype_digit($data) ? $data .' is valid' : $data .' is not valid') .'</li>'; } echo '</ul>'; echo '<strong>Int</strong> <ul>'; foreach($array['int'] as $data) { echo '<li>'. (ctype_digit($data) ? $data .' is valid' : $data .' is not valid') .'</li>'; } echo '</ul>'; ?> It would return; Strings 1 is valid 1.2 is not valid abc is not valid abc1 is not valid Int 1 is not valid 2 is not valid 1.2 is not valid Also, you've not done a check on; $time = (array_key_exists('time', $_POST) && ctype_digit($_POST['time'])) ? $_POST['time'] : null; to see if it's null before inserting into the database. If, in the table structure, `time` cannot be NULL, the query would fail. I'd suggest doing a check on that. Other than that, nice.
-
diff old_version.php new_version.php ;)
-
$change = (string) $_POST['change']; if(ctype_digit($change)) { //Do logic //Update user stats...etc } else { //Fill in the form correctly. } #Assuming this is in your PHP code, and not a (My)SQL interface, or CL. UPDATE `login` SET `health` = LEAST(`health` + ". $change .", `max_health`) WHERE `id`=". $_SESSION['user_id']; Column names and table names are most likely incorrect. Where `max_health` is the column name that holds their maximum health value. I assume it's set up like this, it may not be.
-
No, that's not pretty much it. In fact, that produces the wrong condition. if($ir['hp']+$amount > $ir['maxhp']) { echo 'You can't buy more than 100% health'; } Key character in there !Angel is the %.
-
Hi Arson, I will chase this with ColdBlooded until this is sorted.