Author Topic: Problem with Longbow Crusier  (Read 2098 times)

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Problem with Longbow Crusier
« 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, 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

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Problem with Longbow Crusier
« Reply #1 on: January 04, 2008, 03:33:47 PM »
Right, for the first error report, add:
Code: [Select]
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 still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Problem with Longbow Crusier
« Reply #2 on: January 04, 2008, 03:59:26 PM »
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.

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Problem with Longbow Crusier
« Reply #3 on: January 04, 2008, 04:10:09 PM »
"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...

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Problem with Longbow Crusier
« Reply #4 on: January 04, 2008, 06:00:23 PM »
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.

Code: [Select]
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)
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Problem with Longbow Crusier
« Reply #5 on: January 04, 2008, 08:02:16 PM »
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.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Problem with Longbow Crusier
« Reply #6 on: January 05, 2008, 07:06:49 AM »
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. ;)
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.