I'm not sure wether or not this should be posted in the Scripting forum, but, becuase it's a BSOD problem, I'm assuming it deserves to be here.
A while ago I downloaded RealTech and Realistic Torpedoes 1.2, the torpedoes mod didn't work and Glenflet sent me some replacement files that should fix the problem. However, the files aren't beta tested and they are causing BSOD.
I have been going through these files and debugging them, but there is one problem I just can't solve. It is in a few lines of code and I have isolated it to this section:
def ImportEffect(Name, InfoTarget): # i.e. scripts/Custom/RealTech/GFX/<Name>.tga
global dir
count = 0
list = nt.listdir(dir)
list.sort()
for Effect in list:
s = string.split(Effect, '.')
if len(s) <= 1:
continue
extension = s[-1]
Effectfile = string.join(s[:-1], '.')
if extension == 'tga' and (dir + Name) == Effectfile:
Info = __import__("Custom.RealTech.GFX." + InfoTarget + "_info")
Sx = eval("Info." + str(Effectfile) + "[0]")
Sy = eval("Info." + str(Effectfile) + "[1]")
fX = 0.0
fY = 0.0
pContainer = App.g_kTextureAnimManager.AddContainer(str(dir + str(Name) + ".tga"))
pTrack = pContainer.AddTextureTrack(Sx * Sy)
When I get a console report, it tells me:
s = string.split(Effect, '.')
NameError: string
Can anyone help me here? If this is supposed to be in the Scripting forum then could it please be moved?
Thanks, in advance, for any help anyone can give.