Unable to find module at runtime.

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.

Moderator: POL Developer

Post Reply
Yukiko
Distro Developer
Posts: 2607
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Unable to find module at runtime.

Post by Yukiko » Sat Jan 27, 2007 5:51 pm

I have a script that is giving me the following error on tho console.

WARNING: pkg/systems/stuff/junk.ecl: Unable to find module npc

The script compiles but when the script runs I get that error. Any ideas why?

Thanks for the help.
Sincerely,
Yukiko

I would tell you a UDP joke but you might not get it.

Titus 2:13

User avatar
CWO
POL Expert
Posts: 1148
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA
Contact:

Post by CWO » Sat Jan 27, 2007 6:05 pm

Is that directly an AI script? I don't think you can "use npc" in anything but an npc.script.

Yukiko
Distro Developer
Posts: 2607
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko » Sat Jan 27, 2007 6:30 pm

It's in a spawner script actually.
Sincerely,
Yukiko

I would tell you a UDP joke but you might not get it.

Titus 2:13

User avatar
tekproxy
Forum Regular
Posts: 352
Joined: Thu Apr 06, 2006 5:11 pm
Location: Nederland, Texas
Contact:

Post by tekproxy » Sat Jan 27, 2007 7:10 pm

Does the file npc.em exist in the correct location? Has it been corrupted?

User avatar
CWO
POL Expert
Posts: 1148
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA
Contact:

Post by CWO » Sat Jan 27, 2007 11:43 pm

I think its the "use npc" out of an AI script. I did somewhat the same thing before and it would give the same type of error.

qrak
Grandmaster Poster
Posts: 198
Joined: Sun Feb 05, 2006 4:35 pm
Location: Poland

Post by qrak » Sun Jan 28, 2007 12:43 am

i've had similar problem here:
http://forums.polserver.com/viewtopic.php?t=1116

mobile.setwarmode(0) was causing that and/or vital functions but i'm not sure cuz it was long time ago ;)
Shutdown();

Marilla

Post by Marilla » Sun Jan 28, 2007 4:19 am

Yukiko wrote:It's in a spawner script actually.
You -cannot- use npc.em functions in anything but an AI script. Compile this as a dot-command:

Code: Select all

use uo;
use npc;

program Testing(who)
	say("hi");
endprogram
It will compile fine, but it won't run, and I'm fairly sure you'll get exactly the console error you have seen. In fact, as an interesting side-effect - if you compile this as a dot-command, POL will tell you in-game that the dot-command actually does not even exist.

Anyway... you just plain cannot use npc.em functions in anything except an npc AI.

Yukiko
Distro Developer
Posts: 2607
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko » Sun Jan 28, 2007 5:47 pm

Yes. It was a "use npc" problem. One of my includes that I had added a new function to was apparently intended to be used only in AI scripts and wasn't commented to indicate this.

Thanks CWO for the help.

I think the error message that POL issues could have been clearer.
Perhaps something like '<scriptname> is using npc.em but it isn't an AI script!!!'
Sincerely,
Yukiko

I would tell you a UDP joke but you might not get it.

Titus 2:13

Harley
Forum Regular
Posts: 343
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Re:

Post by Harley » Thu Mar 21, 2019 5:13 pm

Yukiko wrote:
Sun Jan 28, 2007 5:47 pm
I think the error message that POL issues could have been clearer.
Perhaps something like '<scriptname> is using npc.em but it isn't an AI script!!!'
I support you, Yukiko, more detail information will not be superfluous!
I have come across not in the first time with this problem, and POL 099 didn't give out that error in my scripts instead of POL 100. Now, I have to find some 'use npc;' in some script or include..

DevGIB
Grandmaster Poster
Posts: 214
Joined: Mon Feb 06, 2006 6:12 am

Re: Unable to find module at runtime.

Post by DevGIB » Thu Mar 21, 2019 5:58 pm

In an effort of consistency shouldn't all the NPC functions also require an NPC reference?
I know this would lead to a lack of backwards compatibility if you changed Say(string) to Say(npcref, string).
But it would also mean that things like say could be dropped and the PrintAbove could be used in lieu?

I'm just wondering if there is a specific reason that NPC's scripts and functions have been designed to be automatically self referencing, not other script types seem to be that way.

Post Reply