View Single Post
  #4  
Old 07-26-2010, 11:15 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
PHP Code:
function onCreated()
{
  
this.dayarray = {"Sunday""Monday""Tuesday""Wednesday",
    
"Thursday""Friday""Saturday"};
  
serverr.day this.dayarray[0];
  
onTimeout();

so on the getgo im making it sunday, then on the timeout

PHP Code:
function onTimeout()
{
  if (
serverr.time.hour == 24)
  { 
    
serverr.time.hour 0;
    
serverr.day this.dayarray[+1];
  }
}
    
  } 
when it resets the time back to midnight, i want it to change the day, obviously,+1 doesnt work like that. xD

Just want the array to move to the next one, even if ithe next one is [0] even if coming from [6].
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote