Page 1 of 1

Change to the combat hook?

Posted: Thu Feb 08, 2007 12:37 pm
by elenaran
I'm trying to run 097 on linux, and I can't seem to get the combat hook to work properly. The same code runs fine on Windows, but it never seems to run on linux. I figured it was something to do with case-sensitivity, but the cases seem to match up okay. Here's the syshook.cfg:

Code: Select all

SystemHookScript newcombat.ecl
{
	Attack AttackScript

}
This is in the same directory as newcombat.src/ecl, which is simply:

Code: Select all

exported function AttackScript( mobAttacker, mobDefender )
print( mobAttacker.name + " attacking " + mobDefender.name );
	return 1;
endfunction

(there actually is custom combat code, but I just commented it out for now and only have that print statement there)

As far as I can tell everything seems correct, but that print statement never get called. However, if I run the same files on Windows it does call the print statement...

Posted: Sat Apr 14, 2007 6:41 am
by MuadDib
Have you made sure there was no Case Sensitive issue here? (aka, all lower case for the actual file's name, like in your cfg ? )

Posted: Sat Apr 14, 2007 9:08 am
by tekproxy
Is it print or Print ?

Posted: Sat Apr 14, 2007 11:09 am
by CWO
I think hes talking about the file name tek... I never had a problem with case sensitivity of the function names themselves...

Posted: Sat Apr 14, 2007 1:26 pm
by Pierce
I bet it's something like MuadDib mentioned. The newcombat.ecl/src is often spelled as newCombat.ecl/src in older distro versions or by other people. That's always a problem if you use windows and linux versions. I personally changed all filenames to lower case a few years ago and of course do the same in scripting. I think it is perhaps the capital C in combat.

Posted: Sat Apr 14, 2007 4:45 pm
by tekproxy
CWO:
Thanks. I haven't used POL on Linux since... 094. :(