ID:263334
 
Code:
mob/proc
Clock()
spawn(10)
if(hr==12&&sec1==0&&sec2==0&&ampm==0)
gday+=1
world<<"It is now [gdate] [gday]"
if(hr==12&&sec1==0&&sec2==0&&ampm==0)
ampm=1


Problem description: The days move by every minute and I've played with it for a while now. I got it fixed before but don't remember how I did it. Any help would be much appreciated.

unless theres code somewhere else that effects those variables that doesnt really do anything...

and if u meant that theres code that moves the days by every minute, then just make a proc that runs once a minute and adds one to the day... or just stick it in whatever code u have already in there to advance the time
In response to Falacy
There is more to the code, that is just the problem area. The code itself is about 30-40 lines long and I didn't want to go through the trouble of typing out the entire thing. Codes don't exactly paste correctly in here.
In response to Muyoine Guyinne
well id say just add a day counter to that code then o.O
In response to Falacy
That part is the day counter. That's what I'm having trouble with. It's supposed to move to the next day at 12 AM but instead it moves to the next day every minute which isn't even in the code. If it would help I could take the time to post the whole code. o_O
In response to Muyoine Guyinne
lol probably...
In response to Muyoine Guyinne
Code pastes correctly, it just appears that it doesn't because the message body text area is so narrow.
In response to Falacy
mob/proc
Clock()
spawn(5)
if(hour==12&&second1==0&&second2==0&&ampm==0)
gday+=1
world << "It is now: [gdate] [gday]"
Calendar()
if(hour==1&&second1==0&&second2==0&&ampm==0)
ampm=1
if(minute1 != 6)
if(second1 != 6)
if(second2 != 9)
second2++
Clock()
else
second1++
second2 = 0
Clock()
else
second1 = 0
second2 = 0
if(minute2 != 9)
minute2++
Clock()
else
minute1++
minute2 = 0
Clock()
else
minute1 = 0
minute2 = 0
if(hour != 12)
hour++
Clock()
else
hour = 1
if(ampm == 0)
ampm = 1
else
ampm = 0
Clock()
In response to Muyoine Guyinne
Sorry but that took ages to get it to look right. XD That's the whole code that would have to do with it. The only other instance is the calendar and well.. that's for seasons and works fine.