I think I am going to wait till version 2.0 comes out.
That trygetsex() function could create issues.
Here's a temporary fix.
Code:
<?php
function findsex() {
$human = new human;
$tonight = new night;
$excuses = array('Headache','Migraine','Not Today','Menstration');
$num_girl = random(0,count($human->girl));
if ($human->girl[$num_girl]=="stupid")
{
$tonight->sex = true;
}
elseif($human->man)
{
$tonight->sex = false;
}
else
{
$tonight->sex = undefined;
$result=trygetsex();
if ($result==true){
$tonight->sex = true;
}
else
{
$tonight->sex = false;
$number = random(0,count($excuses));
echo $excuses[$number]."<br/>";
}
}
if ($tonight->sex = true) {
echo "<b>Operation Successful!</b>";
return 0;
}
else
findsex();
}
?>