[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  Loop goes too fast
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

Loop goes too fast

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by Doopsko   (2 posts)  [Biography] bio
Date Tue 19 Oct 2004 10:49 PM (UTC)
Hi there again!

I have a problem with loop that is going too fast. Firstly i'll give my example:

Dim position
position = world.GetVariable ("position")

While position > 1 or position < n
Select Case Position
Case 1
world.DoAfter 1, "s"
Case 2
world.DoAfter 1, "se"
Case 3
Case n
world.DoAfter 1, "e"
Case Else
world.note "Blah blah"
End Select

It works, but loop goes so fast that it hangs Mushclient. I've no idea what to do to run it... hmmm slower... Or better - sequentially. I mean action-reaction (I hope you understand :). It would be great if variable were checked once per loop, not still. But how to do it - that's my question.

I will be grateful for any help.
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #1 on Tue 19 Oct 2004 11:05 PM (UTC)
It's not going to fast, it's just that the variable is never going to change while you are looping. You could use a trigger to see when the variable changes.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] 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.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]