Bridge Commander Central
BC Forums => BC Technical Support => Solved Problems => Topic started by: Kirk on January 04, 2008, 03:03:40 PM
-
Well, I installed the Longbow TOS Cruiser, http://bridgecommander.filefront.com/file/Longbow_Torpedo_Cruiser_TOS;36009 (http://bridgecommander.filefront.com/file/Longbow_Torpedo_Cruiser_TOS;36009), and BC gave me these error reports. I lost most of my additional functions, ex abandon ship, adv power control, etc., until I removed the carrier script, then everything was back to normal. I attached all three separate error reports and my attempt to make the carrier file work.
Edited for spelling -Kirk2164
-
Right, for the first error report, add:
from bcdebug import debugat the top of scripts/Custom/Carriers/LongbowTOS.py
If you don't have KM installed, the bcdebug.py file can be found at this very forum.
As for the other 2, I suppose you typed in resume?
Try fixing the first one and see if it remains.
-
I added the code, and BC came back with this. I do have KM installed. All of the error reports disappeared when I removed the carrier file for the Longbow.
-
"invalid syntax" generally means something isn't capitalized where it should be, or something is capitalized where it shouldn't be...
the scripts are case-sensitive, so personally i would start looking for anything (names of scripts or ships) that do not exactly match...
-
It simply means we are one problem down, with more to go. ;)
Ok, this is a slightly cleaned up version of it.
It ought to decrease the number of problems as well.
Python defines "scopes" through indentation, so this needs to be consistent. In the file you attached, it isn't.
from bcdebug import debug
########################
# #
# Edited by Kirk2164 #
# #
########################
Carrier = __import__( "ftb.Carrier")
class LongbowTOS( Carrier.Carrier):
def __init__( self, pShip):
debug(__name__ + ", __init__")
Carrier.Carrier.__init__( self, pShip)
LauncherGroup = __import__( "ftb.LauncherGroup")
group = LauncherGroup.LauncherGroup()
LauncherManager = __import__( "ftb.LauncherManager")
launcher = LauncherManager.GetLauncher( "Shuttle Bay", pShip)
group.AddLauncher( "Shuttle Bay", launcher)
launcher.AddLaunchable( "Shuttle", "ftb.friendlyAI", 3)
self.AddLauncher( "Group 1", group)
#group.SetLaunchMode( LauncherGroup.ALL)
# Define how much Shuttles we can carry maximal (Return Shuttles script)
def GetMaxShuttles(self):
debug(__name__ + ", GetMaxShuttles")
return 3
# "Dauntless" is the "ShipProperty" name of the ship to be registered as
# defined in the Hardpoints PY file for your ship
ShipManager = __import__( "ftb.ShipManager")
ShipManager.RegisterShipClass( "LongbowTOS", LongbowTOS)
-
We're up and running, thanks MLeo, if I knew how to shoot you a cookie, I would. :roll: Why does python have to be so sensitive.
Edited for grammer -Kirk2164
Edit: Used Longbow in game, and no shuttles were available, will post error report ASAP.
-
Why does python have to be so sensitive.
You will be hardpressed to find a language that magically reads your mind and remembers it across computers. :P
Because that would be needed to make it work. ;)