It is currently Mon Dec 01, 2008 1:14 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: 094-095 upgrade prob - POL wont load - bad version number 2
PostPosted: Sun Oct 22, 2006 4:59 am 
Offline

Joined: Fri Oct 13, 2006 6:37 am
Posts: 14
Location: UK
Hi all, I'm in the process of converting a working POL094 setup to 095, to then go to 096 and I've come across this:

Loading package in pkg/std/wands/
Loading package in pkg/std/wwwdebug/
Error loading script pkg/std/attributes/regen.ecl: bad version number 2
Unable to read script 'pkg/std/attributes/regen.ecl'
Error reading script pkg/std/attributes/regen.ecl
Error reading configuration file pkg/std/attributes//vitals.cfg:
Export Script pkg/std/attributes/regen.ecl not found
Element: Vital Life, found on line 1
Server Shutdown: load_vitals_cfg: load_packed_cfgs
Execution aborted due to: Configuration file error

All scripts have been recompiled and compiled ok.
Checked our regen.src and vitals.cfg against the distro and can't see anything glaring missing.
I can't find any reference to "bad version number 2" so I've got no idea what's causing it.
No service packs have been applied yet.
Can anyone shine any light on this?

regen.src:
Code:
use basic;
use basicio;
use uo;
use os;
use cfgfile;
include "include/damage";
include "include/attributes";

var cfgGetRegen := readconfigfile(":*:npcdesc");

exported function GetLifeRegenRate(mob)
    // 1 point per 5 seconds
    // ... is 12 points per minute
    // ... is 1200 hundredths per minute
   
// Streamlined by Siggy, 10/18/01
   var ret := 1200;
   if (mob.npctemplate)
      ret := getregen(mob, "hpregen");
   elseif (getobjproperty(mob, "#hpregen"))
       ret := getobjproperty(mob, "#hpregen");
     endif
 
   ret := getregens(mob, "hpregen", ret);
   return ret;
endfunction

exported function GetLifeMaximumValue(mob)
   
   if (mob.npctemplate)
      //this is what we're gonna test with
      return GetAttribute( mob, "Strength" ) * 100;
   else
   var hisclass := getclass(mob);
   if (hisclass == "warrior")
      return GetAttribute( mob, "Strength" ) * 103;
   endif
       return GetAttribute( mob, "Strength" ) * 100;
   endif
endfunction

exported function GetHungerMaximumValue(mob)
   return 1000;
endfunction

exported function GetStaminaRegenRate(mob)
// Streamlined by Siggy

   var ret := 1200;
   if (mob.npctemplate)
      ret := getregen(mob, "stamregen");
   elseif (getobjproperty(mob, "#stamregen"))
      ret := getobjproperty(mob, "#stamregen");
     endif

   var hisrace := gettrace(mob);
   if (hisrace in {"drow", "elf"})
      ret :=  1330;
   endif
    ret := getregens(mob, "stamregen", ret);
    return ret;
endfunction

exported function GetHungerRegenRate(mob)
     return -1;
endfunction



exported function GetStaminaMaximumValue(mob)
    return GetAttribute( mob, "Dexterity" ) * 100;
endfunction


exported function GetManaRegenRate(mob)
   var ret := 1200;

   if (mob.npctemplate)
      ret :=  getregen(mob, "manaregen");
   elseif (getobjproperty(mob, "#manaregen"))
      ret := getobjproperty(mob, "#manaregen");
   endif
   var hisclass := getclass(mob);
       if (hisclass == "rogue")
          ret :=  1500;
       endif
       ret := getregens(mob, "stamregen", ret);
       return ret;
endfunction

exported function GetManaMaximumValue(mob)

    return GetAttribute( mob, "Intelligence" ) * 100;
endfunction


program regen()
print("Installing regen scripts!");
    return 1;
endprogram


function getclass(who)
if (who.npctemplate)
   return;
endif
return lower(getobjproperty(who, "Class"));
endfunction


function gettrace(who)

return lower(getobjproperty(who, "Race"));
endfunction


function  getregen(who, type)
// Steamlined by Siggy, 10/18/01

var e := cfgGetRegen[who.npctemplate];
var m := getconfigreal(e, type);

if ( (!m) or (m<1) )
   return 1200;
endif

if (m > 10)
   return 12000;
else
   return 1200 * m;
endif

endfunction


function getregens(who, type, current)
var cfg := readconfigfile(":*:itemdesc");
var mod;
var item;
foreach item in listequippeditems(who)
   var val := getconfigreal(cfg[item.objtype], type);
   if (val)
      
      mod := 1;
      current := current * val;
   endif
     val := getobjproperty(item, type);
   if (val)
      val := cdbl(val);
      if (val)
         current := current * mod;
         mod := 1;
      endif
   endif
endforeach
current := cint(current);

return current;
endfunction


vitals.cfg:
Code:
Vital Life
{
    RegenWhileDead 0
    Alias Hits
    Alias Health
    RegenRateFunction regen:GetLifeRegenRate
    MaximumFunction regen:GetLifeMaximumValue
}

Vital Stamina
{
    RegenWhileDead 0
    Alias Stam
    RegenRateFunction regen:GetStaminaRegenRate
    MaximumFunction regen:GetStaminaMaximumValue
}

Vital Mana
{
    RegenWhileDead 0

    RegenRateFunction regen:GetManaRegenRate
    MaximumFunction regen:GetManaMaximumValue
}

Vital Hunger
{
    RegenWhileDead 0
    RegenRateFunction regen:GetHungerRegenRate
    MaximumFunction regen:GetHungerMaximumValue
}


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 22, 2006 5:02 am 
Offline

Joined: Sun Feb 05, 2006 4:35 pm
Posts: 161
Location: Poland
You have to recompile your scripts by using ecompile.exe from POL95

_________________
Shutdown();


Last edited by qrak on Sun Oct 22, 2006 5:04 am, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 22, 2006 5:03 am 
Offline

Joined: Fri Oct 13, 2006 6:37 am
Posts: 14
Location: UK
Quote:
All scripts have been recompiled and compiled ok.

Done already


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 22, 2006 5:04 am 
Offline

Joined: Sun Feb 05, 2006 4:35 pm
Posts: 161
Location: Poland
Delete regen.ecl and try again.

_________________
Shutdown();


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 22, 2006 5:12 am 
Offline

Joined: Fri Oct 13, 2006 6:37 am
Posts: 14
Location: UK
Found the problem...I replaced the files in scripts with the distro upgrade files, however a shortcut to ecompile was pointing to one in the pol root, unsuprisigly it's a 094 ecompile.exe
Going to recompile and test....


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 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