include VBscript files not getting called

Posted by El_cerrito on Fri 13 Jun 2003 05:48 AM — 4 posts, 16,017 views.

USA #0
I included my aliases and trigs with includes statements and everything loads fine and mostly runs good. But none of my alias/trig calls to scripts seems to return anything? Is there some trick to including the .vbs file? I have the variable
script_filename="C:\MudName\scripts_MudName.vbs"

set and pointing in the right place. And when I open the script editor the scripts are there but none of the calls go through.

Any advice?

Tom

PS. When I had the aliases/trigs loaded in the world files the calls to scripts worked.

PPS. I am not getting any errors on the world file load.
Australia Forum Administrator #1
Looking at your PS I'm not sure what you are doing.

Are the aliases in a plugin or the main world? Is scripting enabled?
USA #2
oh flying monkey fargle, Nick, you are right I don't have scripts enabled after I remade all of the separate character 'world' files.

Would it be possible to <include> the various common world variables/constants in my numerous character world files? That way I could avoid the problem above by <including> my most common world settings across all of my chars. Sorry for the bumbleheadedness, I thought I set that value in the world files already.

Whoops, thanks again,

Tom
Australia Forum Administrator #3
Yes, you can do that.

This has worked for me, doing something like this:

Your main world file would contain the things specific to that world, and include the rest, like this:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient>
<muclient>

<!-- settings for this world -->

<world

   name="SMAUG"
   port="4000"
   site="smaug.org"
   > <!-- end of general world attributes -->

</world>

<!-- standard settings -->

<include name="C:\MUSHclient\worlds\include.xml" />

</muclient>


The include file mentioned above would then have the other "standard" stuff, like this:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient>
<muclient>
<world
   player="Nick_Gammon"
   script_editor="notepad"
   script_language="VBscript"
   script_prefix="/"
   enable_scripts="y"
   wrap="y"
   wrap_column="80"
   write_world_name_to_log="y"
   > <!-- end of general world attributes -->

</world>
</muclient>



I have only used a subset here to save space, but that is the general idea. It may not work perfectly for macros, triggers, etc. but for the main world settings, like scripting enabled, it should work.