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
➜ General
➜ Incrementing a variable using the GUI
Incrementing a variable using the GUI
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
Posted by
| BishopOsiris
USA (55 posts) Bio
|
Date
| Reply #15 on Thu 09 Jul 2015 12:08 AM (UTC) |
Message
| Ok, so I think I've been doing this the hard way. All I really need is a timer set to send 'help helpNumber' to the MUD like every 3 seconds. That way I don't have to worry with all the different responses needing triggers. I tried to set up the timer myself using the same code you gave but I kept getting compile errors. Can you tell me how to proceed? | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #16 on Thu 09 Jul 2015 08:21 PM (UTC) |
Message
| Post the timer.
 |
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
|
Post the errors. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| BishopOsiris
USA (55 posts) Bio
|
Date
| Reply #17 on Fri 10 Jul 2015 01:20 AM (UTC) |
Message
| I set the timer to go off every 3 seconds. I send to script. In the Send: box I put:
<send>
-- if variable does not exist, create it
if not GetVariable ('helpNumber') then
SetVariable ('helpNumber', 0)
end -- if
-- get help
Send ("help " .. GetVariable ('helpNumber'))
-- add one to help number
SetVariable ('helpNumber', tonumber (GetVariable ('helpNumber')) + 1)
</send>
When I hit ok it immediately starts popping up compile error boxes every 3 seconds and the only way to stop it is to close down MUSHClient via Task Manager. I'm guessing I need some command to stop/start the timer in the MUD but I still don't think the code above is correct. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #18 on Fri 10 Jul 2015 09:31 AM (UTC) |
Message
| Paste the whole thing, not just part of it.
Please ...
 |
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
|
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| BishopOsiris
USA (55 posts) Bio
|
Date
| Reply #19 on Fri 10 Jul 2015 02:13 PM (UTC) |
Message
| Sorry, Nick. Here's the whole thing:
<timers>
<timer second="3.00" offset_second="0.00" send_to="12"
>
<send><send>
-- if variable does not exist, create it
if not GetVariable ('helpNumber') then
SetVariable ('helpNumber', 0)
end -- if
-- get help
Send ("help " .. GetVariable ('helpNumber'))
-- add one to help number
SetVariable ('helpNumber', tonumber (GetVariable ('helpNumber')) + 1)
</send></send>
</timer>
</timers>
| Top |
|
Posted by
| Xavious
(41 posts) Bio
|
Date
| Reply #20 on Fri 10 Jul 2015 05:05 PM (UTC) Amended on Fri 10 Jul 2015 05:06 PM (UTC) by Xavious
|
Message
| You seem to have double "send" tags in your post, which may have something to do with your problem. I tried copy/pasting your code and that was the issue I had.
Another thing you can do to help debug is when an error popup is displayed, click the checkbox to have errors sent to your world window instead of the popup box. That way you wont get stuck in an infinite loop again where boxes are popping up faster than you can click them.
Here's the version of your timer that I got to work (all I did was get rid of the double send tags):
<timers>
<timer second="3.00" offset_second="0.00" send_to="12"
>
<send>
-- if variable does not exist, create it
if not GetVariable ('helpNumber') then
SetVariable ('helpNumber', 0)
end -- if
-- get help
Send ("help " .. GetVariable ('helpNumber'))
-- add one to help number
SetVariable ('helpNumber', tonumber (GetVariable ('helpNumber')) + 1)
</send>
</timer>
</timers>
| Top |
|
Posted by
| BishopOsiris
USA (55 posts) Bio
|
Date
| Reply #21 on Sun 12 Jul 2015 07:31 PM (UTC) |
Message
| So this did exactly what I wanted it to. Thank you both for your patience and help!
Bishop | 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.
60,129 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top