Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Bayle
(5 posts) bio
|
| Date |
Thu 12 Nov 2009 11:06 PM (UTC) [ quote
] |
| Message |
Greetings!
First off, I need to make the warning that I'm pretty much lost when it comes to Mushclient coding (except for simplistic stuff).
That said, I'm trying to make some plugins that will contain various aliases/triggers. All's well and good, but I cannot figure out how to make the plugin items recognize and otherwise manipulate my world variables.
For example, I have a world variable called target.
A plugin alias that should do "bite @target"
But so far, I can't make it see the variable I already have, and I keep hitting a "Variable 'target' is not defined" error.
Basically, I'd just want to know what I need to make my plugin triggers/aliases interact with variables I create in the world. (Use them, change them, etc.)
Many thanks in advance! | top |
|
| Posted by |
Blainer
(191 posts) bio
|
| Date |
Reply #2 on Fri 13 Nov 2009 12:51 AM (UTC) [ quote
] |
| Message |
If this doesn't give you what you need you might consider putting the variable in the plugin.
You can have an alias / trigger in the plugin that sets or gets the variable. Then you'll have access to it from with in the plugin. | top |
|
| Posted by |
Nick Gammon
Australia (18,772 posts) bio
Forum Administrator |
| Date |
Reply #3 on Fri 13 Nov 2009 02:29 AM (UTC) [ quote
] |
| Message |
Try looking at my YouTube video about making plugins:
http://www.youtube.com/watch?v=wITS3hw1Ynk
You can in fact read the main world's variables but you are better off making the plugin self-contained, as Blainer said. If you establish a "target" variable inside the plugin, that same plugin can refer to it. Just don't try to refer to the main world's target variable. |
- 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.
1,782 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )