World.GetTimerList deleting my timers.

Posted by Rhinoa on Mon 10 Mar 2003 12:02 AM — 5 posts, 18,099 views.

United Kingdom #0
I have this:

timerList = World.GetTimerList
For Each t In timerList
world.setvariable t, world.gettimerinfo (t, 13)
next


Now, for some reason, it deletes all of my timers, and doesn't set any variables.

I've tried it with
world.note

and
world.send

and it works alright without deleting my timers, so my guess is it's the
world.setvariable

bit.

~Rhinoa~
Amended on Fri 14 Mar 2003 08:51 AM by Rhinoa
Australia Forum Administrator #1
I can't reproduce it with these timers:


<timers>
  <timer name="timer2" enabled="y" second="30" offset_second="15" >
  <send>dance</send>

  </timer>
  <timer name="timer1" enabled="y" second="30" >
  <send>sigh</send>

  </timer>
</timers>


Did your timers have labels? Can you copy and paste a couple of example timers? What version of MUSHclient are you using?
United Kingdom #2
All of my timers have labels. I'm using v3.32
Before I wrote this I did a little messing around.
I opened the world, I put the code in immediate and hit run. Like before it deleted my timers and set no variables.
I then readded all of my timers, and hit run again. But this time it set the variables perfectly, and didn't remove any of my timers.

(sample timers)
<timers>
<timer name="Save" script="WorldSave" enabled="y" minute="5" active_closed="y" >

</timer>
<timer name="Keep_Active" enabled="y" minute="15" >
<send>&gt;
&lt;</send>

</timer>
<timer name="Payment" script="Payment" enabled="y" second="1" active_closed="y" >

</timer>
</timers>

~Rhinoa~
Australia Forum Administrator #3
I added your three timers, saved and closed the world.

I then re-opened it, went into immediate mode, and ran your little script.

The variables were set and no timers deleted. This was with 3.32.
United Kingdom #4
Well I guess it only wants to happen to me then..
Thanks for your help anyway Nick, I guess I'll have to find a way around it. I'll post here if I find out anymore.