script dependencies

Post Reply
davidk
Posts: 13
Joined: Wed Dec 09, 2009 7:01 pm
Location: avalon.mud.de

script dependencies

Post by davidk »

Maybe I missed something, but I couldn't find a way to define which scripts in a package have to be executed in a given order. This would be necessary if a script depends on functions or other objects declared in another script.

I would suggest a function dependsOn ("Group/Script") which checks whether the given script was already marked as loaded and in case it wasn't loaded already, it should mark it as loaded and run it.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: script dependencies

Post by Vadi »

That's a great idea. I'm in favour.

I think Lua can use a 'requires' and 'module' functions for this though, yes?

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: script dependencies

Post by Vadi »

Oh, for now though - just a fyi that Mudlet loads the script in the order they show up in the script editor.

Post Reply