[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Beta testing
. . -> [Subject]  Trying to implement INCLUDE file.
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Trying to implement INCLUDE file.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Wed 03 Jul 2002 06:58 PM (UTC)

Amended on Wed 24 Sep 2003 02:00 AM (UTC) by Nick Gammon

Message
What am I doing wrong here?
Main .MCL file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient>
<!-- Saved on Wednesday, July 03, 2002, 2:46 PM -->
<!-- MuClient version 3.23 -->
<!-- Written by Nick Gammon  -->
<!-- Home Page: http://www.muclient.com/ -->
<muclient>
<include name="E:\User\Magnum\MUSHclient\Worlds\- Defaults -\Magnum Script Tools.xml" />
<world
   muclient_version="3.23"
   world_file_version="15"
   date_saved="2002-07-03 14:46:52"

yadda, yadda

Include file:

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

<!--	===============================================================
		SCRIPT TOOLS

		This include file is a library of assorted script subroutines
		that are general purpose, and may be called from a variety of
		plugins.

		=========================================================== -->

<muclient>
<script>
<![CDATA[

My old script file in here.

]]>
</script>
</muclient>

Error window:

Line   14: Tag not used: <script> (muclient)

How am I supposed to arrange the tags so this will work?

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Thu 04 Jul 2002 12:01 AM (UTC)
Message
This would not work even without the include directive.

The main problem here is that a world file does not have a <script> tag associated with it (scripts have to be in the external script file).

To achieve the basic idea you need to make a "general subs" plugin, then the script tag will be accepted as part of the plugin.

Then you need to ensure that the 'general' plugin is there when the plugins that rely on it are installed. For instance, in the "install" sub you could check it was there, or simply load it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Reply #2 on Thu 04 Jul 2002 01:46 AM (UTC)
Message
Ack, Ok this doesn't help me. It's basically the same as making the script a plugin itself, which doesn't work well because calling subroutines in a plugin is not practical. I'll have to resort to copying the script I want to each plugin that will use it.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Sun 07 Jul 2002 10:59 PM (UTC)
Message
Quote:

I'll have to resort to copying the script I want to each plugin that will use it.


Well, that is only one line in each plugin that needs it, that isn't too bad.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


5,125 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]