Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Beta testing
➜ Trying to implement INCLUDE file.
Trying to implement INCLUDE file.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Magnum
Canada (580 posts) 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. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) 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 | Top |
|
Posted by
| Magnum
Canada (580 posts) 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. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) 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 | 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.
15,240 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top