|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Tue Dec 12, 2006 2:49 pm
[1.22] Use of pacakages. not bug |
Ok ive just started moving everything into packages to make things organised. But things dont seem to cross reference.
In package "afflictions" i have the following trigger
Trig - You have been afflicted with CMUDitis
value - randomaliasname
in another package... eg the main window i have
#alias randomaliasname {#say woooot, it works}
when the trigger fires it doesnt run the alias. just sends the value to the mud.
this is the same when setting variables. |
|
Last edited by adamwalker on Tue Dec 12, 2006 3:30 pm; edited 1 time in total |
|
|
|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Tue Dec 12, 2006 2:50 pm |
ah my bad. case of RTFM. so it all has to be self contained. hmmph. was hoping to use them to keep systems seperate but have them cross-link
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Dec 12, 2006 3:17 pm |
PEBKAC ;P
I'm not sure why you want to use packages for that. You can separate scripts into modules very easily, that makes plenty of sense (I have a module for herb curing, a module for elixir curing, and so on). Dividing things into packages is supposed to be for scripts that are self-contained, because that's the whole point of being able to plug them in using the package library. You just download it and it works, because all the scripts in each package are self-contained. Scripts that refer to each other should be in the same package but different modules.
That said, it IS possible to do what you're trying to do by creating a module in the second package for randomaliasname and setting the module to External or Global publication. It's impossible to do with settings inside a window. |
|
|
|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Tue Dec 12, 2006 3:31 pm |
wanna know why i wanna do that with packages? really wanna know?
cos i didnt RTFM (again)! hehe
ok, im gonna scurry into a rock as ive only just realised modules exist. and yes they do everything i wanted. heh
Thanks fang |
|
|
|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Tue Dec 12, 2006 4:15 pm |
hmm i seem to have a problem with some alias's not working within modules. is this normal?
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Dec 12, 2006 4:17 pm |
What do you mean by not working? You mean you have:
Module
--> Alias
Session Window
all in the same package and if you type the alias in the session window, nothing happens? Or what? |
|
|
|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Tue Dec 12, 2006 4:23 pm |
its when i have an alias in one module calling an alias in another module. it doesnt call the 2nd alias. it just sends the output to the mud. i also get the same when i have a macro calling an alias.
|
|
|
|
crycry Apprentice
Joined: 24 Jun 2006 Posts: 169 Location: UK - South Coast
|
Posted: Tue Dec 12, 2006 4:36 pm |
is the other module made available to the module with the calling alias? if not, thatll do it
|
|
_________________ 'Life is what happens, when your too busy doing something else'
_________________
XP Pro SP2
cMud 1.24
_________________ |
|
|
|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Tue Dec 12, 2006 5:35 pm |
made em all global. same problem
|
|
|
|
crycry Apprentice
Joined: 24 Jun 2006 Posts: 169 Location: UK - South Coast
|
Posted: Tue Dec 12, 2006 5:41 pm |
even if theyre global, they still need to have access to the package containing the other alias, make sure that the package containing the alias your calling is ticked in the enabled list. ive made this mistake a few times now.
|
|
_________________ 'Life is what happens, when your too busy doing something else'
_________________
XP Pro SP2
cMud 1.24
_________________ |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Dec 12, 2006 5:44 pm |
Modules don't need to be made available to each other if they're in the same package. Modules can always see other modules in the same package with either Local or Global set. I tested this before I posted above by opening the untitled session, creating a module, and creating an alias "test" that echoes "test" to the screen. Saved, and it worked fine. Changed the module to Global, and it worked fine.
This won't work if your modules are set to external - make sure they really are set to Global or Local and the setting has stuck.
(also standard things, not using corrupt packages from old versions, fresh install etc etc) |
|
|
|
crycry Apprentice
Joined: 24 Jun 2006 Posts: 169 Location: UK - South Coast
|
Posted: Tue Dec 12, 2006 6:04 pm |
ah, i may have misread. I thought Adam was saying that an alias outside the current package wasnt being called.. if im wrong, ignore me ill shuddup
|
|
_________________ 'Life is what happens, when your too busy doing something else'
_________________
XP Pro SP2
cMud 1.24
_________________ |
|
|
|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Tue Dec 12, 2006 6:53 pm |
did a clean reinstall. same problem
its not external modules. its just 2 modules within the same package. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Dec 12, 2006 7:56 pm |
Adam, can you provide the exact step-by-step procedure of what you are doing that isn't working. I think people (including me) are confused now.
|
|
|
|
|
|