Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ decreasing seconds in a timer crashes mushclient
decreasing seconds in a timer crashes mushclient
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Faolong
USA (28 posts) Bio
|
Date
| Thu 31 Oct 2002 02:57 PM (UTC) |
Message
| i pinned down the problem to the fact that if i used AddTimer and had it on replaced option to decrease the seconds, it would crash mushclient, i also tried the new SetTimerOption("name", "seconds", "5") from 16 seconds to 5 seconds and it would just crash... oh yeah, i am calling the function from the same timer and the function is the one that is changing the seconds of the timer, but it doesn't crash if i increase the seconds though... weird | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 31 Oct 2002 07:48 PM (UTC) |
Message
| It is:
SetTimerOption "name", "second", "5"
("second" not "seconds").
I can't reproduce that. My test keeps working, and a check of the code doesn't reveal why it should crash. Do you have more than one timer?
I don't understand this bit "used AddTimer and had it on replaced option to decrease the seconds".
What did you do exactly? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Faolong
USA (28 posts) Bio
|
Date
| Reply #2 on Thu 31 Oct 2002 11:47 PM (UTC) |
Message
| Yeah i did the "second" one i just mistyped it... you know when you AddTimer there is a flag to replace the timer and i think it was 1024 so i used that with that flag plus temporary + oneshot + enabled. i put the replace there just in case it was still there, it would replace it...
i'll clarify the process more:
first i have this timer called "auction_countdown" with a 16 second time which calls a script called auction_countdown... in the script i have
world.AddTimer("auction_countdown", 0, 0, 3, "", 17409, "auction_countdown"); which decreases the seconds from 16 to 3... and then it would just crash. i also tried world.SetTimerOption("auction_countdown", "second", "3"); instead of the AddTimer and it would just crash. | Top |
|
Posted by
| Faolong
USA (28 posts) Bio
|
Date
| Reply #3 on Fri 01 Nov 2002 12:15 AM (UTC) |
Message
| okay, i found the problem if i named the timer "auction_countdown1" it doesn't crash and if i named it "auction_countdown" it crashed... maybe because the script function is also called "auction_countdown".... | Top |
|
Posted by
| Faolong
USA (28 posts) Bio
|
Date
| Reply #4 on Fri 01 Nov 2002 12:46 AM (UTC) |
Message
| okay this is some weird stuff, but if i named the timer "auction_countdown_timer" it will crash... seems like any other naming method works except that one and the "auction_countdown" one.... | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #5 on Fri 01 Nov 2002 12:51 AM (UTC) |
Message
| What I think is probably happening here is that MUSHclient is "walking" a list of timers to fire.
The timer calls a script, the script replaces the timer, effectively deleting and re-adding an entry in the timer list.
Depending on the name of the timer, ie. whether it has already passed it in the list, it now processes a deleted timer.
I suggest you use the settimeroption, rather than the "delete myself" approach. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Faolong
USA (28 posts) Bio
|
Date
| Reply #6 on Fri 01 Nov 2002 05:46 AM (UTC) |
Message
| i actually tried both and they both seem to crash on me having the timer name "auction_countdown" and "auction_countdown_timer"... now i am just using SetTimerOption("auction_countdown1", "second", 3); | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #7 on Sun 03 Nov 2002 08:54 PM (UTC) |
Message
| Are you saying you are using SetTimerOption, and it works, or it doesn't work? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Faolong
USA (28 posts) Bio
|
Date
| Reply #8 on Mon 04 Nov 2002 02:16 AM (UTC) |
Message
| SetTimerOption("auction_countdown", "second", 3); <--- doesn't work
SetTimerOption("auction_countdown_timer", "second", 3); <--- doesn't work
SetTimerOption("auction_countdown1", "second", 3); <--- works
the only difference is in the naming, and a lot of other ones work... it's just those two, that i have found, that doesn't work | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
20,591 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top