Raised This Month: $ Target: $400
 0% 

Time limit on script


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CarbonDioxide
Member
Join Date: Apr 2012
Old 04-26-2012 , 11:43   Re: Time limit on script
Reply With Quote #4

Quote:
Originally Posted by <VeCo> View Post
Add a global variable and set it's value with get_gametime() on successful touch and check the difference between the current time and that's from the variable.

It should be something like this:

PHP Code:
if((get_gametime() - variable_name) > 360.0//360 seconds have passed since the last use? 
{
//success
//code, code, code...
 
variable_name get_gametime() //set the current time for the next check

I have set the variable name to "xpblock_use" but I get an error, should I include something?

The error:
PHP Code:
ErrorUndefined symbol "xpblock_use" on line 1585 
CarbonDioxide is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode