Freedom Reborn Archive

Freedom Force Forums => Scripting Forum => Topic started by: bearded on December 20, 2007, 07:47:40 PM

Title: this is my script log error
Post by: bearded on December 20, 2007, 07:47:40 PM
NameError: isHero
initialising FFQ_initialiseExtras()

ok, i fixed it by copying this to m252script2, but i had to change the main data/script file.  is there somewhere i could put it in my mod instead, so i don't have to make a mod install that changes ppl's main data files?
def isHero(object):
    return (Object_GetClass(object) & js.OC_CONTROLLABLE)

def isBaddie(object):
    return Object_GetClass(object) & (js.OC_MINION | js.OC_VILLIAN)

also, my ingame voices do not work, unless i lose the mission and restart, then they are fine.
Title: Re: this is my script log error
Post by: M25 on December 21, 2007, 09:26:34 AM
You can fix many of those errors by including the cshelper module prefix

so cshelper.isHero(x)  instead of isHero(x)


Other people have been having this problem too (though I don't understand why it is happening now and never happened before), so updating others' main script files may be warranted.

Title: Re: this is my script log error
Post by: M25 on December 22, 2007, 04:40:41 AM
Actually, if you are making a campaign mod, you could use the 'S' versions of the ffx and ai files  (ffxS.py, cshelperS.py, m25newai2S.py, etc.) as DrMike did with his Strangers mod.  Those files stay in the Scripts directory of your mod and you don't need to modify the ones in the Data directory.

Title: Re: this is my script log error
Post by: bearded on December 22, 2007, 01:03:10 PM
aha!  thank you, that's the answer i needed.