try in console%sch=schedule(5000,0,"echo","hello"); schedule(2000,0,"echo",getEventTimeLeft(%sch));
schedule or gameBase::schedule returns a "schedule index". Pass it to getEventTimeLeft to get the amount of time remaining.
$schedule = schedule(time,0,function,parameters);getTimeRemaining($schedule);
getTimeRemaining()
schedule or gameBase::schedule returns a "schedule index". Pass it to getTimeRemaining to get the amount of time remaining.
Now, is there something such as isEventPending()?
Yes, that's the exact name of the function.
You should try it before asking questions about everything, Tojehusiza.
I did, it didn't seem to work for me either.
Then you are doing something wrong. Show us how you used it.
$Calendar = schedule($Cal::loop, 0, calendarLoop);
function serverCmdDate(){ if(isEventPending($Calendar)) { %suffix = getSuffix($Cal::curD); %timeLeft = getTimeRemaining(%Calendar); messageClient(%client, '', "It is\c3" SPC $Cal::curM SPC $Cal::curD @ %suffix @ "," SPC $Cal::curY @ "\c6. There are about\c3" SPC mFloor(%timeLeft) SPC "\c6seconds left before the next day."); } //end if else messageClient(%client, '', "\c6The calendar is not currently running!");} //end func