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 ➜ General ➜ Grouping issues

Grouping issues

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


Posted by AesInkdancer   (2 posts)  Bio
Date Sun 12 Oct 2008 04:10 PM (UTC)
Message
I'm using MUSHclient to play Achaea, having just moved over from Nexus, and grouping is not working for me.

Before, I could just type #groupoff travel to turn off my travel group, but now that doesn't work, even if I change my speedwalk symbol to something other than #.

I tried using the 'world.EnableGroup "group", 0' command, but it doesn't do anything except confuse the system.

What am I doing wrong?
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #1 on Sun 12 Oct 2008 08:52 PM (UTC)
Message
Lua doesn't see 0 as false. use true and false instead.

world.EnableGroup 'travel', false
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 12 Oct 2008 08:57 PM (UTC)
Message
Quote:

I tried using the 'world.EnableGroup "group", 0' command, but it doesn't do anything except confuse the system.


The words "confuse the system" have confused the programmers.

If I try your example I actually got:


 unexpected symbol near ','


The actual error message always helps. :)

In Lua if you have multiple arguments you have to put them in brackets, like this:


world.EnableGroup ("foogroup", false)

-- or

world.EnableGroup ("foogroup", true)


A bit of testing shows that, whilst WillFa is right about Lua in general treating 0 as true, the function EnableGroup will actually work correctly if you use 0 and 1, it was the brackets that were your problem.


- Nick Gammon

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

Posted by AesInkdancer   (2 posts)  Bio
Date Reply #3 on Mon 13 Oct 2008 01:10 AM (UTC)
Message
Error message from Achaea:

1286h, 1803m ex-world.EnableGroup 'travel', false
You've baffled me!

(It gives me the phrases normally used to respond to typos in commands)
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #4 on Mon 13 Oct 2008 01:12 AM (UTC)
Message
Put a / in front of the command, or whatever you have selected as Script Prefix in the Configuration -> Scripts section.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #5 on Mon 13 Oct 2008 02:54 AM (UTC)
Message
I notice you have chosen to not follow my suggestion about putting brackets around the arguments. If you are using Lua you need those.

If you want to make an alias to do that it needs to do "send to script", here are examples:


<aliases>

  <alias
   match="#groupoff"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
EnableGroup ("travel", false)
Note ("Travel group now OFF")
</send>
  </alias>

  <alias
   match="#groupon"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
EnableGroup ("travel", true)
Note ("Travel group now ON")
</send>
  </alias>

</aliases>


See: http://mushclient.com/pasting for how to copy those examples into the client.



- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


16,684 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.