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.
Unable to find module at runtime.
Moderator: POL Developer
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
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
You -cannot- use npc.em functions in anything but an AI script. Compile this as a dot-command:Yukiko wrote:It's in a spawner script actually.
Code: Select all
use uo;
use npc;
program Testing(who)
say("hi");
endprogram
Anyway... you just plain cannot use npc.em functions in anything except an npc AI.
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!!!'
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!!!'
Re:
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..
Re: Unable to find module at runtime.
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.
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.