|
Sogom Newbie
Joined: 27 Dec 2006 Posts: 8 Location: Nashville, TN
|
Posted: Wed May 02, 2007 1:35 pm
Aliases under the English Keypad |
Unlike zMud, I am not able to script under the English Keypad using Aliases. Anywhere else in the package editor when I type an alias it turns BLUE, but not under the English Keypad.
I have a very basic code that I want to add there. The Variable assignment works great, but not the Alias.
Example: under the ADD key I have the following code...
d;#VAR DIR {d};spellchk
spellchk is an alias that checks to see if any of my spells have dropped and if so cast them. What is the work around, move all my keys to macros? Seems a bit redundant. |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed May 02, 2007 1:46 pm |
1. You shouldn't be adding settings to the CMUD packages because they may be overwritten in future installations. You should put your aliases in your own packages.
2. Make sure that you've enabled the package with the alias in it for the package that's using the alias. You can look at the package properties to find a list of enabled packages. If the alias is disabled or the package it's in isn't enabled, the alias name will appear black instead of blue. |
|
|
|
Sogom Newbie
Joined: 27 Dec 2006 Posts: 8 Location: Nashville, TN
|
Posted: Wed May 02, 2007 2:01 pm |
Hrm... The variable assignment works fine... without a hitch. I can access the variables fine. I appreciate the prudence of not adding to the CMUD packages, but I do find that odd. Why are they editable if they are not to be editted and if I create my own, why even give them to me? Also, there is nothing wrong with the Alias. I copied the class over to where all my scripts are stored and it works flawlessly.
If varable assignment works there, then why not aliases? It just seems logical they would, but they don't. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed May 02, 2007 2:46 pm |
Sogom wrote: |
Why are they editable if they are not to be editted and if I create my own, why even give them to me? |
They can be edited if you wish, it's just not recommended because it would get overwritten the next time you install CMUD.
But based on what you described it would seem that whatever package you have that contains the "spellchk" alias is not enabled for the English KeyPad package. Remember if you have to think of scoping now that we have packages. The variable assignment works because it will always be OK to define a variable in any scope. The alias however will not show unless English Keypad knows about the spellchk alias, which will only happen if you allow it to know the package(i.e. have the the package that contains alias enabled).
I hope that helps. |
|
_________________ Asati di tempari! |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed May 02, 2007 5:50 pm |
Tech is correct...you should not be editing the packages that come with CMUD. You should use them as examples for your own packages. Just make a copy of the EnglishKeypad.pkg file and call it something else. Then go into your Preferences and in the Scripting page, go to the Packages tab to change the list of default packages loaded for new sessions. Remove the EnglishKeypad and add your own package. Now, whenever you create a new session, it will use your package instead of the default.
The EnglishKeypad.pkg and EnglishDirections.pkg files are overwritten by each new update for CMUD, so any changes you make to those files will be lost. |
|
|
|
Sogom Newbie
Joined: 27 Dec 2006 Posts: 8 Location: Nashville, TN
|
Posted: Wed May 02, 2007 8:37 pm |
That helped. Sorry that I wasn't understanding before.
|
|
|
|
|
|