It is currently Tue Dec 02, 2008 5:46 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Little error in script
PostPosted: Wed Nov 28, 2007 7:27 pm 
Online
User avatar

Joined: Sun Jun 18, 2006 7:45 pm
Posts: 36
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

_________________
Dark Dungeons Scripter


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 29, 2007 9:52 am 
Online
User avatar

Joined: Sun Jun 18, 2006 7:45 pm
Posts: 36
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?

_________________
Dark Dungeons Scripter


Top
 Profile  
 
 Post subject: Re: Little error in script
PostPosted: Thu Dec 20, 2007 9:04 am 
Offline
Distro Developer
User avatar

Joined: Thu Apr 06, 2006 5:11 pm
Posts: 350
Location: Nederland, Texas
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 20, 2007 9:15 am 
Offline
Distro Developer
User avatar

Joined: Thu Apr 06, 2006 5:11 pm
Posts: 350
Location: Nederland, Texas
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 20, 2007 11:50 am 
Online
User avatar

Joined: Sun Jun 18, 2006 7:45 pm
Posts: 36
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

_________________
Dark Dungeons Scripter


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 20, 2007 12:49 pm 
Offline
Distro Developer
User avatar

Joined: Thu Apr 06, 2006 5:11 pm
Posts: 350
Location: Nederland, Texas
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.


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

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


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