PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Little error in script

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Distro Bug Reports
Display posts from previous:   

Author Message
ELSoft



Joined: 18 Jun 2006
Posts: 36

PostPosted: Wed Nov 28, 2007 11:27 pm    Post subject: Little error in script Reply with quote

In Distro 097 "pkg/items/sysbook/commands/gm/readonly.src" the cfgfile.em is not declared and the script use ReadConfigFile and GetConfigString.

Code:
use uo;
use os;

program textcmd_readonly(character)
   SendSysMessage(character, "Target a book to switch between read-only and read/write");
   var book := Target(character);
   if ( !book or book.errortext )
      SendSysMessage(character, "Cancelled.");
      return 0;
   endif

   // check to see if it's an itemdesc based book. If so, exit
   var cfg := ReadConfigFile(":*:itemdesc");
   cfg := cfg[book.objtype];
   var author := GetConfigString(cfg, "Author");
   if ( author and !author.errortext )
      SendSysMessage(character, "This is a shared book and cannot be changed.");
      return 0;
   endif

   if ( book.IsWritable() )
      book.ReadOnly(1);
      SendSysMessage(character, "This book is now read-only.");
   else
      book.ReadOnly(0);
      SendSysMessage(character, "This book is now read-write.");
   endif
endprogram

Author Message
ELSoft



Joined: 18 Jun 2006
Posts: 36

PostPosted: Thu Nov 29, 2007 1:52 pm    Post subject: Reply with quote

Code:
checkpoint: load_itemdesc
Couldn't find an Armor Zone in armrzone.cfg for layer 0
Error in ObjType 0x1b72. Package armor.
Server Shutdown: load_itemdesc
Execution aborted due to: Configuration file error



Code:
Armor 0x1B72
{
   //Main Stuff
   Name      BronzeShield
   Desc      round shield
   VendorBuysFor   45
   VendorSellsFor   91

   //Equipment Info
   MaxHP      28
   StrRequired   20

   //Armor Info
   AR      10
   Coverage   Shield

   //Scripts
   DestroyScript   onDestroy

   //Custom Values
   Repairable   1
   MedLoss      nomed
}


I search in armzone.cfg for a "Coverage Shield" but is not defined?

Author Message
tekproxy
Distro Developer


Joined: 06 Apr 2006
Posts: 350
Location: Nederland, Texas

PostPosted: Thu Dec 20, 2007 1:04 pm    Post subject: Re: Little error in script Reply with quote

ELSoft wrote:
In Distro 097 "pkg/items/sysbook/commands/gm/readonly.src" the cfgfile.em is not declared and the script use ReadConfigFile and GetConfigString.


Thanks for this. It has been fixed in the distro.

Author Message
tekproxy
Distro Developer


Joined: 06 Apr 2006
Posts: 350
Location: Nederland, Texas

PostPosted: Thu Dec 20, 2007 1:15 pm    Post subject: Reply with quote

ELSoft wrote:
checkpoint: load_itemdesc
Couldn't find an Armor Zone in armrzone.cfg for layer 0
Error in ObjType 0x1b72. Package armor.
Server Shutdown: load_itemdesc
Execution aborted due to: Configuration file error



This is strange because in the distro there is no coverage defined for the bronze shield. How did it get there?

Maybe someone added an armor zone for shields and then set that shield to use that armor zone. I'm not sure how that would work but if you find out let me know.

Just remove it and see if everything works correctly.

Oh and please limit each thread to 1 problem. Thanks.

Author Message
ELSoft



Joined: 18 Jun 2006
Posts: 36

PostPosted: Thu Dec 20, 2007 3:50 pm    Post subject: Reply with quote

In pkg/items/clothing/config/itemdesc.cfg

Code:
Armor 0x1515
{
   //Main Stuff   
   Name   cloak
   VendorBuysFor   21
   VendorSellsFor   43
   
   //Equipment Info   
   MaxHP   20
   
   //Armor Info   
   AR   1

   //Scripts   
   DestroyScript   clothOnDestroy
   
   //Custom Values   
   candye   1
}


The "Coverage Body" is not defined and throws the same problem with layer 0

Author Message
tekproxy
Distro Developer


Joined: 06 Apr 2006
Posts: 350
Location: Nederland, Texas

PostPosted: Thu Dec 20, 2007 4:49 pm    Post subject: Reply with quote

The string "coverage" is not found in any script or config file in the distro. Not sure how I got there for you.

It seems this is not a distro bug but a problem with your distro.

I also don't know what that itemdesc.cfg entry is for.

Post new topic   Reply to topic    PenUltima Online Forum Index -> Distro Bug Reports All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty