It is currently Tue Sep 07, 2010 4:29 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Unable to read script
PostPosted: Wed Jun 09, 2010 8:46 pm 
Offline
New User

Joined: Wed Jun 09, 2010 8:32 pm
Posts: 3
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.


Top
 Profile  
 
 Post subject: Re: Unable to read script
PostPosted: Thu Jun 10, 2010 7:43 am 
Offline
Grandmaster Poster

Joined: Thu Feb 02, 2006 7:29 am
Posts: 136
Location: Livorno, Italy
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:

_________________
Gnafu
DRL freelance scripter :D


Top
 Profile  
 
 Post subject: Re: Unable to read script
PostPosted: Thu Jun 10, 2010 4:24 pm 
Offline
New User

Joined: Wed Jun 09, 2010 8:32 pm
Posts: 3
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.


Top
 Profile  
 
 Post subject: Re: Unable to read script
PostPosted: Fri Jun 11, 2010 7:11 am 
Offline
Neophyte Poster
User avatar

Joined: Sun Feb 05, 2006 5:24 am
Posts: 34
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

_________________
<uninitialized object>


Top
 Profile  
 
 Post subject: Re: Unable to read script
PostPosted: Sun Jun 13, 2010 1:13 am 
Offline
New User

Joined: Wed Jun 09, 2010 8:32 pm
Posts: 3
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl