Regen.ecl not finding module npc

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 097.
Note: Core 097 is no longer officially supported.

Moderator: POL Developer

goqsane
Neophyte Poster
Posts: 38
Joined: Mon Sep 29, 2008 2:25 am

Re: Regen.ecl not finding module npc

Post by goqsane »

I find this outrageously stupid as it had not worked like this for previous versions of POL which gives the scripters more of a flexibility, from this point I would like to scream for changes in the way ecompile compiles the scripts!
User avatar
*Edwards
Forum Regular
Posts: 303
Joined: Fri Dec 28, 2007 11:19 pm
Location: Montreal, Canada

Re: Regen.ecl not finding module npc

Post by *Edwards »

I find this outrageously stupid as it had not worked like this for previous versions of POL which gives the scripters more of a flexibility, from this point I would like to scream for changes in the way ecompile compiles the scripts!
They're all trying to help you ( core developers, distro developer, and custom shard developers ). Changes between the versions are, from my point of view, fixes for even more flexibilities with the core/scripts. I remember when I had to switch my pol093 to pol095 it was absolutely insane and hours of work but anyway it's part of the game and now I'm updating to 097 so I can use extra realms, I can modify packets, I can easily create new extra for my shard so the past changes was for me absolutely necessary. Anyway, you're frustration is pointless. If your problem is fixed just thanks your "helpers".
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: Regen.ecl not finding module npc

Post by CWO »

All upgrades are going to have their problems. The POL devs have to hit a fine balance between supporting the past and pushing into the future. Sometimes pushing into the future will still support the past, sometimes they have to drop the past so it doesn't hold them back. I remember I was frustrated with converting my shard from 095-096 a couple years ago with my shard crashing repeatedly, sometimes every 20 minutes, but in the end, it was definitely worth it. I can tell you, expect to take months upgrading especially with the last 2 cores because these aren't small incremental changes, these are huge steps and added the things many of us wanted all along. I'm figuring 098 will be the same thing because they have a bit of a complicated roadmap to that too. Its so much that I already said I'm not converting my shard to 097, I'm REWRITING my shard specifically to 097 style. In the end, I know its worth the work, it also removes a lot of the trash that has built up with a shard continuously being converted and going through many past devs, it also gives me a chance to learn every system from the ground up as I write it so I can pinpoint bugs and problems easier to fix them. Count everything like this as an experience. This way if someone comes in later having the same problem or a similar one, you know what to suggest from your experience on how to fix it.
Luth
Former Developer
Posts: 200
Joined: Mon Jan 30, 2006 8:10 am

Re: Regen.ecl not finding module npc

Post by Luth »

I will look into this specific issue, as it certainly seems like a bug from the way it's described. Thank you for bringing it to our attention. Turley, if you have extra time, I would appreciate any help you could lend as well. From my understanding, this is an error in the way POL behaves and therefore should be a priority fix for 098.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Regen.ecl not finding module npc

Post by Yukiko »

I'd agree with CWO and Luth. The advances in the core are necessary if POL is to remain dynamic and not stagnate.

Also, as Luth said, this oddity appears to be a bug. If you have a statement that uses a function in a module but do not "use" that module the compiler should generate an error.
goqsane
Neophyte Poster
Posts: 38
Joined: Mon Sep 29, 2008 2:25 am

Re: Regen.ecl not finding module npc

Post by goqsane »

I've been trying to convert everything for the last two weeks, with little to no success. The problem is that I managed to get rid of all the 'useless' npc modules used in my scripts but now some of my scripts which FOR SURE don't use a npc module don't work and I'm fixing one by one but every time I do that another one pops up, this is useless. I have lost all my hopes to ever uprgade, PLEASE, developers do something with eCompile because gradually, day by day I am losing my players. The current POL 96.7 core I'm using on my FreeBSD machine just doesn't work as it should and I must run it on SelectTimeout which is simply put, unplayable. I just want the compiler to warn you that something is wrong with the modules, or, EVEN BETTER, just make it work as it worked in POL96, WHY HAVE YOU CHANGED THAT ONE? I understand changing function names (or, rather, I don't, but anyway, it's an easy one), BUT WHY EVER CHANGE THE WAY ECOMPILE WORKS?
goqsane
Neophyte Poster
Posts: 38
Joined: Mon Sep 29, 2008 2:25 am

Re: Regen.ecl not finding module npc

Post by goqsane »

WARNING: scripts/textcmd/coun/go.ecl: Unable to find module npc
script go: setProgram failed
for instance
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Re: Regen.ecl not finding module npc

Post by Pierce »

I have lost all my hopes to ever uprgade, PLEASE, developers do something with eCompile because gradually, day by day I am losing my players.
Why should you loose players? I hope you don't make an update on a live shard instead of simple duplicate the server as a test server and make changes there :o
goqsane
Neophyte Poster
Posts: 38
Joined: Mon Sep 29, 2008 2:25 am

Re: Regen.ecl not finding module npc

Post by goqsane »

Guh, of course, I don't do that on a live server, which doesn't mean the live server isn't lagged BECAUSE it IS, that's why I need to update, POL 96.7 doesn't work very well on 64 bit FreeBSD
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Re: Regen.ecl not finding module npc

Post by Pierce »

I'm quite astonished of your problems to convert your pol up to a newer version.
I converted 94 to 95, afterwards 95 to 96 and lately 96 to 97 with no other info than the given ones in core-changes. 95 to 96 was hard because of the realms. But it was possible. I made some mistakes, but that were my mistakes. Ecompile always guides me. Perhaps you could give a complete example whats wrong, if you think ecompile is wrong. I personally never had such problems and i think the devs would appreciate a complete example of your case, if you say ecompile is the problem. Not just go.ecl don't work. Show us your go.src with the possible included "includes" and i think there are a lot of people here to find a solution for your problems ;)
goqsane
Neophyte Poster
Posts: 38
Joined: Mon Sep 29, 2008 2:25 am

Re: Regen.ecl not finding module npc

Post by goqsane »

Then I would have to publish almost every single file from my shard. It's not hard to notice that the current state of eCompile is, to a large extent, very incongruent when it comes to compiling. I want it to return an error when module npc is used without any functions from that module in a given script to be compiled. That's the only thing I ask for
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Regen.ecl not finding module npc

Post by Turley »

And this request is not an easy one, the compiler and executor are far away from being simple. So this would take a while to fix this.
Why dont you remove all "use npc" in all files and add it again to your ai scripts? Its fast and the compiler gives the error if somewhere the "use npc" is missing.
goqsane
Neophyte Poster
Posts: 38
Joined: Mon Sep 29, 2008 2:25 am

Re: Regen.ecl not finding module npc

Post by goqsane »

That's my whole point, it doesn't throw out an error when a 'use npc' is missing, unfortunately
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Regen.ecl not finding module npc

Post by Turley »

Are you sure that you removed all "use npc" lines? Because when I make a blank script like

Code: Select all

program test()
  Self();
endprogram
The compiler throws the error "Function Self() is not defined."
Luth
Former Developer
Posts: 200
Joined: Mon Jan 30, 2006 8:10 am

Re: Regen.ecl not finding module npc

Post by Luth »

I want it to return an error when module npc is used without any functions from that module in a given script to be compiled.
That is not an error, not by any language or coding standard.
goqsane
Neophyte Poster
Posts: 38
Joined: Mon Sep 29, 2008 2:25 am

Re: Regen.ecl not finding module npc

Post by goqsane »

Code: Select all

use uo;
use os;
use npc;

program compiler_works( who, item )

SendSysMessage(who, "Hello, I will show you how sucky eCompile and POL got once they changed it to POL97, this script will compile fine and run on POL96, but for some reason it won't in POL97");

endprogram

code says it all
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Regen.ecl not finding module npc

Post by Yukiko »

Is that script an AI script? Because if it is not then eCompile is correct in reporting an error. I was told that NPC.em is only legal inside AI scripts.

From the NPC.em documentation:
File: NPC.em

Description: Functions for manipulating non-player character mobiles. All (most?) these functions are limited to use in an NPC context (meaning an AI script).
Last Modified: 10/27/2007
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Regen.ecl not finding module npc

Post by Turley »

And why dont you just remove the "use npc" ? Its the simplest way to fix your problem and of cause faster then waiting if one core dev finds the problem. (If misusing of npc.em will be declared as a bug)
goqsane
Neophyte Poster
Posts: 38
Joined: Mon Sep 29, 2008 2:25 am

Re: Regen.ecl not finding module npc

Post by goqsane »

The reason is because I use a lot of 'utility' .inc files which have references to many functions from various modules, if I have the 'use XXX'; in the .inc files some of the scripts which don't want to use a certain module will get compiled that way anyway. I just want the devs to revert that stupid use npc; change...
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Regen.ecl not finding module npc

Post by Turley »

goqsane wrote:none of my .inc files have that line :(
.... no comment ...
And what exactly is so hard on removing the "use npc" lines in any inc and write them in your ai scripts?
I think almost every texteditor has an feature called "search and replace in files" ...
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: Regen.ecl not finding module npc

Post by CWO »

Its bad scripting style to put use x; in .inc files.
Luth
Former Developer
Posts: 200
Joined: Mon Jan 30, 2006 8:10 am

Re: Regen.ecl not finding module npc

Post by Luth »

goqsane wrote:

Code: Select all

use uo;
use os;
use npc;

program compiler_works( who, item )

SendSysMessage(who, "Hello, I will show you how sucky eCompile and POL got once they changed it to POL97, this script will compile fine and run on POL96, but for some reason it won't in POL97");

endprogram

code says it all
I just copy/pasted that program into a new textcmd file AND a use item file, compiled them, and ran them. There was no error or warning in either the compiler, or the server, exactly as it should be. Can someone reproduce this error on a clean install?
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Re: Regen.ecl not finding module npc

Post by Pierce »

No the error i can't reproduce. It compiles fine for me too. As i expected the compiler surely gives a "local variable 'item' not used" ;)
goqsane
Neophyte Poster
Posts: 38
Joined: Mon Sep 29, 2008 2:25 am

Re: Regen.ecl not finding module npc

Post by goqsane »

I am sorry for having a very rude tongue, but as I said before:

I have deleted all my 'use xxx' lines from my .inc files a trillion light years ago. It's not that problem anymore. I just had to add more 'use XXX' to my .src files by hand, one-by-one, which I did. STILL SOME OF THE SCRIPTS didn't work, because apparently POL thought they had use npc (I deleted all .dep and .ecl files in the end and recompiled)
I am just very frustrated. I don't claim I know everything, but I've been around for long enough to know things.

I'll try once again tomorrow, hoping for better days!

EDIT: Oh that 'item' in my code, obviously, it wasn't supposed to be there or perhaps I had had something else in mind to show you but in the course of writing I had forgotten it, doesn't matter ;)
Luth
Former Developer
Posts: 200
Joined: Mon Jan 30, 2006 8:10 am

Re: Regen.ecl not finding module npc

Post by Luth »

Well goqsane, I've been unable to reproduce this problem. If the script you pasted is indeed giving you an error, I have no idea why, and I'm going to be unable to figure it out. If you find further details, please share.
Post Reply