Register forum user name Search FAQ

Gammon Forum

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 ➜ VBscript ➜ world.DoAfter

world.DoAfter

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


Posted by Ploppaz   (2 posts)  Bio
Date Sat 30 Aug 2003 06:57 AM (UTC)
Message
Hello.

I'm a total newbie to scripts, but I tried to make one of my own.

The script file is as follows:
--
Sub test
world.DoAfter 10, "echome 'Aye"
end sub
--
Am I correct in assuming that this will send the command "echome 'Aye" to the mud in 10 seconds? I have scripting enabled, and the script file selected - do I need to do anything else?

I have also tried running "§world.DoAfter 10, "echome 'Aye"" (§ being my prefix) but this havn't worked either.

What happens is that I enter the command, or run my script §test - and I get no output whatsoever, and no command sent to the mud after 10 seconds.

What have I done wrong here?

Sincerely,
\Ploppaz
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 30 Aug 2003 08:19 AM (UTC)
Message
I tested that and it worked, as I would expect. What is wrong? Try something simpler first, like:

§world.Note "test"

You should see "test" appear immediately. If not, something is wrong with scripting. If it does, the DoAfter is not working. DoAfter actually creates a timer. Do you have timers enabled? Also under global preferences, what is the timer interval? 1 second?


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #2 on Sat 30 Aug 2003 10:37 AM (UTC)

Amended on Sat 30 Aug 2003 10:39 AM (UTC) by Poromenos

Message
Yes, it sounds correct, but the sub should be

Sub test (name, line, wildcards)
world.DoAfter 10, "echome 'Aye"
end sub

otherwise you'd get an error... Since you're not getting anything, I'd try Nick's suggestions, the problem should be there.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Ploppaz   (2 posts)  Bio
Date Reply #3 on Sat 30 Aug 2003 07:32 PM (UTC)
Message
Aha! :D

I didn't know you would have to have timers enabled, thank you :) It works now.
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.


14,383 views.

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

Go to topic:           Search the forum


[Go to top] top

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