"cannot find module that"

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 096.
Note: Core 096 is no longer officially supported.

Moderator: POL Developer

Post Reply
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

"cannot find module that"

Post by Poi »

Alright for some reason the compiler thinks I am trying to call "that.em"...
Compiling: ../scripts/items/enhancehammer.src
Unable to find module that
(Filename: C:\pol096\scripts\items\that.em)
Compilation failed.
Execution aborted due to: Error compiling file

Here is the code, I can't figure out why its doing this :S

Code: Select all

use cfgfile;
use uo;
use os;
use util;


include "include/objtype";
include "include/skillPoints";



var casediff;
var dmgmod;
var nme;
var diff;

program enhancehammer(who, item)
SendSysMessage(who, "What gems would you like to use?");
var gems := Target(who);
if(!gems)
SendsysMessage(who, "Those aren't gems!");
return;
endif
if(gems.amount < 10)
SendSysMessage(who, "You don't have enough gems!);
return;
endif
           case(gems.objtype)
              0xF30: nme :=" [diamond encrested]"; dmgmod := "5";
			  default: sendsysmessage(who, "You cannot use that!"); return;
            endcase
			
SendSysMessage(who, "What do you want to enhance?");
var wep := Target(who);
if(!wep)
SendsysMessage(who, "You didn't select anything!");
return;
endif
if(wep.isa(POLCLASS_WEAPON))
if(!failorsucceed1)
SendSysMessage(who, "You failed to encrest the weapon and destroy some gems in the proccess")
SubtractAmount(gems, (randomint(10)));
return;
endif
wep.name := (wep.desc) + nme;
wep.dmg_mod := (Cint(wep.dmg_mod) + Cint(dmgmod));
SubtractAmount(gems, 10);
SendSysMessage(who, "You enhance the weapon.");
elseif(wep.isa(POLCLASS_ARMOR))

if(!failorsucceed1)
SendSysMessage(who, "You failed to encrest the weapon and destroy some gems in the proccess")
SubtractAmount(gems, (randomint(10)));
return;
endif
wep.name := (wep.desc) + nme;
wep.ar_mod := (Cint(wep.ar_mod) + Cint(dmgmod));
SubtractAmount(gems, 10);
SendSysMessage(who, "You enhance the armor.");
else
return;
endif
endprogram

function failorsucceed1(who)
if(!checkhisskill(who, SKILLID_TACTICS, 80))
	diff := diff + 5;
endif
if(!checkhisskill(who, SKILLID_TACTICS, 100))
	diff := diff + 10;
endif
if(!checkhisskill(who, SKILLID_BLACKSMITHY, 80))
	diff := diff + 5;
endif
if(!checkhisskill(who, SKILLID_BLACKSMITHY, 100))
	diff := diff + 40;
endif
if(!checkhisskill(who, SKILLID_TINKERING, 80))
	diff := diff + 5;
endif
if(!checkhisskill(who, SKILLID_TINKERING, 100))
	diff := diff + 20;
endif
if(!checkhisskill(who, SKILLID_MINING, 80))
	diff := diff + 5;
endif
if(!checkhisskill(who, SKILLID_MINING, 100))
	diff := diff + 30;
endif
if(diff <= 10)
casediff := 1;
elseif(diff <= 20)
casediff := 2;
elseif(diff <= 30)
casediff := 3;
elseif(diff <= 40)
casediff := 4;
elseif(diff <= 50)
casediff := 5;
elseif(diff <= 60)
casediff := 6;
elseif(diff <= 70)
casediff := 7;
elseif(diff <= 80)
casediff := 8;
elseif(diff <= 90)
casediff := 9;
elseif(diff <= 100)
casediff := 10;
endif


case(casediff)
              1: if(randomint(diff) >= (diff / 2)) return 1; else return 0; endif
			  2: if(randomint(diff) >= (diff / 2)) return 1; else return 0; endif
			  3: if(randomint(diff) >= (diff / 2)) return 1; else return 0; endif
			  4: if(randomint(diff) >= (diff / 2)) return 1; else return 0; endif
			  5: if(randomint(diff) >= (diff / 2)) return 1; else return 0; endif
			  6: if(randomint(diff) >= (diff / 2)) return 1; else return 0; endif
			  7: if(randomint(diff) >= (diff / 2)) return 1; else return 0; endif
			  8: if(randomint(diff) >= (diff / 2)) return 1; else return 0; endif
			  9: if(randomint(diff) >= (diff / 2)) return 1; else return 0; endif
			  10: if(randomint(diff) >= (diff / 2)) return 1; else return 0; endif
			  default: sendsysmessage(who, "You have failed to encrest the item!"); return 0;
endcase
endfunction


function checkhisskill(who, skill, amt)
  var his_skill := GetEffectiveSkill(who, skill);
  if(his_skill >= amt)
    return 1;
  else
    return 0;
  endif
endfunction
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Re: "cannot find module that"

Post by Austin »

Heading out... so I cant really dig into it... but I find it amusing that it matches the system message!

sendsysmessage(who, "You cannot use that!");
Poi
Grandmaster Poster
Posts: 298
Joined: Fri Apr 14, 2006 9:36 am

Re: "cannot find module that"

Post by Poi »

Hahaha that's actually really funny :P
User avatar
CWO
POL Expert
Posts: 1158
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: "cannot find module that"

Post by CWO »

Code: Select all

SendSysMessage(who, "You don't have enough gems!);
missing end quote... That's the problem.
Post Reply