Jump to content

Error 324 - Function problem


EmlynK

Recommended Posts

I'm creating my own lottery feature for my online game, which uses in-game money. I decided to create my own function to compare the numbers of each ticket. Before I started creating the mod, I did some testing to see if my pseudocode function would work. When I go onto my test page, I get this error: Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.

 

I've Googled it, and it says that it's a Google Chrome error and that I should restart my browser and so on, which I did. Nothing worked. I've yet to try it in another browser yet.....

 

My code is below:

<?php
include_once(DIRNAME(__FILE__) ."/globals.php");
ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_NOTICE);

function checkResult($numbers, $winNums, $key, $wins) {
if($key >= 7 && $wins >= 7) {
	print "Break out <br />";
	return $correct;
	break;
}
else {
	$nums = unserialize($numbers);
	$winning = unserialize($winNums);
	$p = $nums[$key];
	$n = $winning[$wins];

	if($n != $p && $n > $p) {
		print "Increment \$key <br />";
		$key++;
		checkResult($numbers, $winNums, $key, $wins);
	}
	elseif($n != $p && $n < $p) {
		print "Increment \$wins <br />";
		$wins++;
		checkResult($numbers, $winNums, $key, $wins);
	}
	elseif($n === $p) {
		print "Matching! <br />";
		$correct++;
		$key++;
		$wins++;
		checkResult($numbers, $winNums, $key, $wins);
	}
}
}

$yourNumbers = array(15,20,42,37,4,;
$winNumbers = array(17,28,20,4,15,39);
$sortYourNumbers = sort($yourNumbers);
$sortWinNumbers = sort($winNumbers);

print_r($yourNumbers);
print "<br />";
print_r($sortYourNumbers);
print "<hr />";
print_r($winNumbers);
print "<br />";
print_r($sortWinNumbers);

$yrs = serialize($yourNumbers);
$wns = serialize($winNumbers);
$correct = 0;

print "<br />";
print $yrs ."<br />";
print $wns;

checkResult($yrs, $wns, 0, 0);

$h->endpage();
?>

 

Could someone please point out to me why this is causing the unknown error? I've tried other pages on my website, they all work perfectly.

 

Any help will be appreciated.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.