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

Gammon Software Solutions forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Grouping issues

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Grouping issues
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Nick Gammon   Australia  (18,800 posts)  [Biography] bio   Forum Administrator
Date Mon 13 Oct 2008 02:54 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Worstje   Netherlands  (867 posts)  [Biography] bio
Date Mon 13 Oct 2008 01:12 AM (UTC)  quote  ]
Message
Put a / in front of the command, or whatever you have selected as Script Prefix in the Configuration -> Scripts section.
[Go to top] top

Posted by AesInkdancer   (2 posts)  [Biography] bio
Date Mon 13 Oct 2008 01:10 AM (UTC)  quote  ]
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)
[Go to top] top

Posted by Nick Gammon   Australia  (18,800 posts)  [Biography] bio   Forum Administrator
Date Sun 12 Oct 2008 08:57 PM (UTC)  quote  ]
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
[Go to top] top

Posted by WillFa   USA  (517 posts)  [Biography] bio
Date Sun 12 Oct 2008 08:52 PM (UTC)  quote  ]
Message
Lua doesn't see 0 as false. use true and false instead.

world.EnableGroup 'travel', false
[Go to top] top

Posted by AesInkdancer   (2 posts)  [Biography] bio
Date Sun 12 Oct 2008 04:10 PM (UTC)  quote  ]
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?
[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.


1,310 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]