Display countdown

Posted by Petethemeat on Fri 15 Jul 2011 12:14 PM — 7 posts, 31,065 views.

#0
Hi!

How do I best display a countdown?

My trigger contains the following line of code sent to script:


Doafter(math.random (1500, 1600 / 10, "alias1")


So what I simply want is some sort of clock that shows the countdown in my main window.

Regards
Peter
USA Global Moderator #1
Quote:
My trigger contains the following line of code sent to script:
Doafter(math.random (1500, 1600 / 10, "alias1")

No it doesn't, because that's not valid syntax. What does your trigger actually have?
Australia Forum Administrator #2
Search the forum?

http://www.gammon.com.au/forum/?id=10969
#3
Fiendish said:

Quote:
My trigger contains the following line of code sent to script:
Doafter(math.random (1500, 1600 / 10, "alias1")

No it doesn't, because that's not valid syntax. What does your trigger actually have?




Well, since it works just fine I count that as a valid syntax!
Australia Forum Administrator #4
Template:copying
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
USA #5
Petethemeat said:
Well, since it works just fine I count that as a valid syntax!


1. You're missing a ) somewhere
2. The function is DoAfter, not Doafter

What you pasted is invalid, which is why Fiendish is asking for a literal paste of what your trigger contains. A correct semblance of your paste would be:
DoAfter(math.random(1500, 1600) / 10, "alias1")


For utmost accuracy, you should export the trigger and paste it here. Nick linked to a forum post showing how to do that.
#6
Twisol said:

Petethemeat said:
Well, since it works just fine I count that as a valid syntax!


1. You're missing a ) somewhere
2. The function is DoAfter, not Doafter

What you pasted is invalid, which is why Fiendish is asking for a literal paste of what your trigger contains. A correct semblance of your paste would be:
DoAfter(math.random(1500, 1600) / 10, "alias1")


For utmost accuracy, you should export the trigger and paste it here. Nick linked to a forum post showing how to do that.



Oh yes, my mistake :-)

Im currently on my iPad and will upload it as soon as Im at home!