Raised This Month: $ Target: $400
 0% 

Array must be indexed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 06-20-2010 , 15:48   Array must be indexed
Reply With Quote #1

PHP Code:
public check()
{
    new 
itime[3]
    
get_time("%H",itime,2)
    if(
itime == 24)
    {
        
server_cmd("restart")
    }
    else
    {
        
set_task(0.1,"check")
    }

Code:
Error: Array must be indexed (variable "itime")
What does this mean and how can it be solved.
SpeeDeeR is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-20-2010 , 15:49   Re: Array must be indexed
Reply With Quote #2

equal(itime, "24")
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-20-2010 , 15:59   Re: Array must be indexed
Reply With Quote #3

get_time() will return an hour of 24? Shouldn't it be 0?
__________________
fysiks is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 06-22-2010 , 17:43   Re: Array must be indexed
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
get_time() will return an hour of 24? Shouldn't it be 0?
Possitive.
SpeeDeeR is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 06-23-2010 , 05:50   Re: Array must be indexed
Reply With Quote #5

That script will keep restarting server till next hour
__________________
xPaw is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 06-23-2010 , 07:19   Re: Array must be indexed
Reply With Quote #6

Yes, I actually though about this.So I set it for 00:00:00
SpeeDeeR is offline
Reply



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 14:58.


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