Jump to content
MakeWebGames

Recommended Posts

Posted

Re: Using time?

isn't there a typo here...

 

if(!$ir['item_recieved'])	{
if(date('g') <= 7 && date('g') >= 9)   {

	echo 'You landed it, and it is the right time! You just found item x';
	item_add($ir['userid'], 59, 1);

}
}

 

shouldn't it be

 

if(!$ir['item_recieved'])	{
if(date('h') <= 7 && date('h') >= 9)   {

	echo 'You landed it, and it is the right time! You just found item x';
	item_add($ir['userid'], 59, 1);

}
}

 

g next to h typo me thinks :-D

Posted

Re: Using time?

sorry haunted i thought it was just h for time...

shouldn't the cron query be setting item_received back to 0 ready for the next day and a sql query in the if statement updating item_received to 1 ?

Posted

Re: Using time?

This:

 

if(!$ir['item_recieved'])   {
  if(date('g') <= 7 && date('g') >= 9)   {

     echo 'You landed it, and it is the right time! You just found item x';
     item_add($ir['userid'], 59, 1);

  }
}

 

Should be

 

if(!$ir['item_recieved'])   {

  if(date('g') <= 7 && date('g') >= 9)   {

     echo 'You landed it, and it is the right time! You just found item x';
     item_add($ir['userid'], 59, 1);
  mysql_query("UPDATE `users` SET `item_recieved` = 1 WHERE `userid` = ".$ir['userid']);

  }

}

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.   Paste as plain text instead

  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...