Unable to read script

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 098.

Moderator: POL Developer

Post Reply
felipefcm
New User
Posts: 3
Joined: Wed Jun 09, 2010 8:32 pm

Unable to read script

Post by felipefcm »

Hi everyone, first post here.

I'm using Pol 098.2. I've compiled all the scripts/pkg's with no errors, but pol can't read the ecl files.

Exception caught while loading script pkg/items/debris/:debris:debris/method.ecl: Unable to open pkg/items/debris/:debris:debris/method.ecl for reading.
Unable to read script 'pkg/items/debris/:debris:debris/method.ecl'
Error reading script pkg/items/debris/:debris:debris/method.ecl

The path to the script is right, since the the file is in pkg/items/debris/debris/method.ecl
The itemdesc of this pkg shows the correct path too.

Someone know what can be the problem here?
Thank you.
Gnafu
Grandmaster Poster
Posts: 136
Joined: Thu Feb 02, 2006 7:29 am
Location: Livorno, Italy
Contact:

Re: Unable to read script

Post by Gnafu »

When does the error occur?

If you are using start_script you must remove the ".ecl"

Code: Select all

var script := Start_Script(":debris:debris/method");
You must enable the package too
In pkg.cfg

Code: Select all

Enabled       (0/1)
Name          (string package name)
[Requires      (string package name) [(int version)] ...]
[Replaces      (string package name) ...]
[Conflicts     (string package name) ...]
[Version      (string version number)]
[CoreRequired (int core version without leading 0, or full version string)]
[ProvidesSystemHomePage (0/1)]

[Maintainer   (string name)]
[Email        (string email)]
the name between the colon is the name in the pkg.cfg, not the real directory name.
You can rename your debris folder in "beautifulldebrispackage" and still access it with :debris:
felipefcm
New User
Posts: 3
Joined: Wed Jun 09, 2010 8:32 pm

Re: Unable to read script

Post by felipefcm »

It occurs after loading the packages.

...(Pkg loading)
Loading package in pkg/utils/worldSaver/
INSTALLING: Exported Vital - RegenRate and MaxValue functions ...
Exception caught while loading script pkg/items/debris/:debris:debris/method.ecl: Unable to open pkg/items/debris/:debris:debris/method.ecl for reading.
Unable to read script 'pkg/items/debris/:debris:debris/method.ecl'
Error reading script pkg/items/debris/:debris:debris/method.ecl
Exception caught while loading script pkg/items/deed/:deed:deed/method.ecl: Unable to open pkg/items/deed/:deed:deed/method.ecl for reading.
Unable to read script 'pkg/items/deed/:deed:deed/method.ecl'
Error reading script pkg/items/deed/:deed:deed/method.ecl
Exception caught while loading script pkg/items/deed/:deed:deed/method.ecl: Unable to open pkg/items/deed/:deed:deed/method.ecl for reading.
Unable to read script 'pkg/items/deed/:deed:deed/method.ecl'
Error reading script pkg/items/deed/:deed:deed/method.ecl
Exception caught while loading script pkg/items/deed/:deed:deed/method.ecl: Unable to open pkg/items/deed/:deed:deed/method.ecl for reading.
Unable to read script 'pkg/items/deed/:deed:deed/method.ecl'
Error reading script pkg/items/deed/:deed:deed/method.ecl
Exception caught while loading script pkg/items/deed/:deed:deed/method.ecl: Unable to open pkg/items/deed/:deed:deed/method.ecl for reading.
Unable to read script 'pkg/items/deed/:deed:deed/method.ecl'
Error reading script pkg/items/deed/:deed:deed/method.ecl
Exception caught while loading script pkg/items/deed/:deed:deed/method.ecl: Unable to open pkg/items/deed/:deed:deed/method.ecl for reading.
Unable to read script 'pkg/items/deed/:deed:deed/method.ecl'
Error reading script pkg/items/deed/:deed:deed/method.ecl
...

As you can see it occurs to 90% of pkg's.
The pkg is enabled and Im not using start_scritpt(). In debris pkg for example I the itemdesc.cfg:

Item 0xC2D
{
Name debris
Desc debris

Movable 0
SaveOnExit 0

ControlScript :debris:debris/control
CreateScript :debris:debris/onCreate
MethodScript :debris:debris/method
}

Is there anything wrong here?
Thank you.
User avatar
AsYlum
Grandmaster Poster
Posts: 109
Joined: Sun Feb 05, 2006 5:24 am
Location: Poland

Re: Unable to read script

Post by AsYlum »

Check ecompile and *.em files version.

- what do you have in pkg.cfg for debris?
- what your ecompile.cfg says and what is full path to POL?

If ecompile and *.em files are up to date try recompile all scripts 'ecompile -A'

And hmm... what do you have in your method.src script?

http://docs.polserver.com/pol098/script ... thodScript make sure it has right syntax ;)

Edit: well i think that you can't have method.src script and start it with start_script function. method.src is POL special type of script. Looks like itemdesc entry for MethodScript should be noted with .ecl extension so: MethodScript :debris:debris/method.ecl Rest of entries like Script/OnInsert/OnRemove/Control... should be written without .ecl
felipefcm
New User
Posts: 3
Joined: Wed Jun 09, 2010 8:32 pm

Re: Unable to read script

Post by felipefcm »

AsYlum wrote:Check ecompile and *.em files version.
Ok, using the .em files provided in the 098.2 core package.
Just a few constants definitions in uo.em and vitals.em
AsYlum wrote:what do you have in pkg.cfg for debris?
Enabled 1
Name debris
AsYlum wrote:what your ecompile.cfg says and what is full path to POL?
Its exactly like the file ecompile.cfg.example but with the actual paths to modules, scripts and pkg folders.
AsYlum wrote:what do you have in your method.src script?

Code: Select all

use uo;
use os;

program Install()
	return 1;
endprogram

exported function IsDebris(item)
	return 1;
endfunction
AsYlum wrote:MethodScript should be noted with .ecl extension
I tried that, didn't work here, no additional errors anyway.
Post Reply