Author Topic: Error: Optional not working  (Read 1373 times)

0 Members and 1 Guest are viewing this topic.

Error: Optional not working
Anyone have any idea what this error means?

Error: Optional not working
File:c:\fs2_open\code\ship\ship.cpp
Line: 4194
[This filename points to the location of a file on the computer that built this executable]

Call stack:
------------------------------------------------------------------
    fs2_open_d-20061130.exe 00816507()
    fs2_open_d-20061130.exe 008f0c5e()
    fs2_open_d-20061130.exe 00816a4a()
    fs2_open_d-20061130.exe 006f5f69()
    fs2_open_d-20061130.exe 00702a79()
    fs2_open_d-20061130.exe 00702da9()
    fs2_open_d-20061130.exe 00bb4be7()
    kernel32.dll 7c816fd7()
------------------------------------------------------------------

Heres the ship table:
Code: [Select]
#ship classes
;-----------------------------------------------------------------------------------------------------
; Aurora

$Name:                          @Aurora
$Short name: TAurora
$Species:                       Terran
+Tech Description: XSTR("A new Confederation class strike cruiser. It carries a strong forward punch, with two heavy beam cannons and two heavy plasma cannons.  Alongside this, it carries a contingent of strike fighters and bombers. With it's high speed it can push through behind enemy lines leaving devastation in it's wake.", 3045)
$end_multi_text

$POF file:                      aurora.pof
$Detail distance: (150, 400, 600, 1300)
$Show damage: NO
$Density:                       1
$Damp:                          0.2
$Rotdamp:                       1.0
$Max Velocity: 0.0, 0.0, 40.0
$Rotation time: 85,85,85
$Rear Velocity: 0.0
$Forward accel: 10.0
$Forward decel: 5.0
$Slide accel: 0.0
$Slide decel: 0.0
$Expl inner rad: 125.0
$Expl outer rad: 650.0
$Expl damage: 200.0
$Expl blast: 3500.0
$Expl Propagates: YES
$Shockwave Speed: 500.0
$Default PBanks: ()
$Default SBanks: ()
$SBank Capacity: ()
$Shields:                       8000
$Power Output: 90.0
$Max Oclk Speed: 60.0
$Max Weapon Eng: 100.0
$Hitpoints:                     125000
$Armor Type: CapHull

$Flags:                         ( "capital" "big damage" "in tech database"  "surface shields")
$AI Class:                      Captain
$Afterburner: NO
$Countermeasures: 0
$Scan time:                     2000
$EngineSnd: 138                   ;; Engine sound of ship
$Closeup_pos: 0.0, 0.0, -615
$Closeup_zoom: 0.5
$Score: 2000

$Subsystem:                     turret01a,1.12,1
$Armor Type: Everything
$Default PBanks:        ( "Medium Pulse Beam" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem: Turret02a,1.12,1
$Armor Type: Everything
$Default PBanks: ( "Medium Pulse Beam" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem: Turret03a, 1.2, 1
$Armor Type: Everything
$Default PBanks: ( "Heavy Plasma" "Heavy Plasma" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret04a, 1.2, 1
$Armor Type: Everything
$Default PBanks:        ( "Heavy Plasma" "Heavy Plasma" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret05a, 1.2, 1
$Armor Type: Everything
$Default PBanks:        ( "Heavy Turret Particle Cannon" "Heavy Turret Particle Cannon" "Heavy Turret Particle Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret06, .4, 1
$Armor Type: Everything
$Default PBanks:        ( "Turret Tachyon Cannon" "Turret Tachyon Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret07, .4, 1
$Armor Type: Everything
$Default PBanks:        ( "Turret Tachyon Cannon" "Turret Tachyon Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret08, .4, 1
$Armor Type: Everything
$Default PBanks:        ( "Turret Tachyon Cannon" "Turret Tachyon Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret09, .4, 1
$Armor Type: Everything
$Default PBanks:        ( "Turret Tachyon Cannon" "Turret Tachyon Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret10, .4, 1
$Armor Type: Everything
$Default PBanks:        ( "Turret Tachyon Cannon" "Turret Tachyon Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret11, 0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret12, 0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret13, 0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret14,  0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret15,  0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret16, 0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret17, 0.24, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret18a, 0.6  , 1
$Armor Type: Everything
$Default PBanks: ( "Energy Flak" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret19a, 0.6  , 1
$Armor Type: Everything
$Default PBanks: ( "Energy Flak" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem: fighterbay01, 35, 0.0
$Subsystem: fighterbay02, 35, 0.0
$subsystem: engine01
$subsystem: engine02
$subsystem: engine03
$subsystem: bridge
;$Subsystem:                     Radar, 4,0.0
#end

Edit: this occurs with build fs2_open_d-20061130 and fred2_open_3_6_9
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Error: Optional not working
That is one of the worst error messages I've ever seen...

Anyway, you need to specify a subsystem strength and an 0.0 turning rate for the engines and the bridge, just like you did for the (commented) radar.

  
Re: Error: Optional not working
Thanks, didn't catch that nor did FS2..

Sorry I can confirm that, that wasn't the cause. It's still complaining.

Maybe post the code section in question, that might explain why. 
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Error: Optional not working
Can you first post the new entry?

 
Re: Error: Optional not working
Only changes made were to the subsystems, I was missing two parameters (strength and rotation)

Code: [Select]
#ship classes
;-----------------------------------------------------------------------------------------------------
; Aurora

$Name:                          @Aurora
$Short name: TAurora
$Species:                       Terran
+Tech Description: XSTR("A new Confederation class strike cruiser. It carries a strong forward punch, with two heavy beam cannons and two heavy plasma cannons.  Alongside this, it carries a contingent of strike fighters and bombers. With it's high speed it can push through behind enemy lines leaving devastation in it's wake.", 3045)
$end_multi_text

$POF file:                      aurora.pof
$Detail distance: (150, 400, 600, 1300)
$Show damage: NO
$Density:                       1
$Damp:                          0.2
$Rotdamp:                       1.0
$Max Velocity: 0.0, 0.0, 40.0
$Rotation time: 85,85,85
$Rear Velocity: 0.0
$Forward accel: 10.0
$Forward decel: 5.0
$Slide accel: 0.0
$Slide decel: 0.0
$Expl inner rad: 125.0
$Expl outer rad: 650.0
$Expl damage: 200.0
$Expl blast: 3500.0
$Expl Propagates: YES
$Shockwave Speed: 500.0
$Default PBanks: ()
$Default SBanks: ()
$SBank Capacity: ()
$Shields:                       8000
$Power Output: 90.0
$Max Oclk Speed: 60.0
$Max Weapon Eng: 100.0
$Hitpoints:                     125000
$Armor Type: CapHull

$Flags:                         ( "capital" "big damage" "in tech database"  "surface shields")
$AI Class:                      Captain
$Afterburner: NO
$Countermeasures: 0
$Scan time:                     2000
$EngineSnd: 138                   ;; Engine sound of ship
$Closeup_pos: 0.0, 0.0, -615
$Closeup_zoom: 0.5
$Score: 2000

$Subsystem:                     turret01a,1.12,1
$Armor Type: Everything
$Default PBanks:        ( "Medium Pulse Beam" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem: Turret02a,1.12,1
$Armor Type: Everything
$Default PBanks: ( "Medium Pulse Beam" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem: Turret03a, 1.2, 1
$Armor Type: Everything
$Default PBanks: ( "Heavy Plasma" "Heavy Plasma" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret04a, 1.2, 1
$Armor Type: Everything
$Default PBanks:        ( "Heavy Plasma" "Heavy Plasma" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret05a, 1.2, 1
$Armor Type: Everything
$Default PBanks:        ( "Heavy Turret Particle Cannon" "Heavy Turret Particle Cannon" "Heavy Turret Particle Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret06, .4, 1
$Armor Type: Everything
$Default PBanks:        ( "Turret Tachyon Cannon" "Turret Tachyon Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret07, .4, 1
$Armor Type: Everything
$Default PBanks:        ( "Turret Tachyon Cannon" "Turret Tachyon Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret08, .4, 1
$Armor Type: Everything
$Default PBanks:        ( "Turret Tachyon Cannon" "Turret Tachyon Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret09, .4, 1
$Armor Type: Everything
$Default PBanks:        ( "Turret Tachyon Cannon" "Turret Tachyon Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret10, .4, 1
$Armor Type: Everything
$Default PBanks:        ( "Turret Tachyon Cannon" "Turret Tachyon Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret11, 0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret12, 0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret13, 0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret14,  0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret15,  0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret16, 0.36, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret17, 0.24, 1
$Armor Type: Everything
$Default PBanks: ( "Turret Laser Cannon" "Turret Laser Cannon" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret18a, 0.6  , 1
$Armor Type: Everything
$Default PBanks: ( "Energy Flak" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem:                     Turret19a, 0.6  , 1
$Armor Type: Everything
$Default PBanks: ( "Energy Flak" )
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,0,0

$Subsystem: fighterbay01, 35, 0.0
$Subsystem: fighterbay02, 35, 0.0
$subsystem: engine01,  35, 0.0
$subsystem: engine02,  35, 0.0
$subsystem: engine03,  35, 0.0
$subsystem: bridge,  35, 0.0
;$Subsystem:                     Radar, 4,0.0

#end
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Error: Optional not working
 :lol: Well, I, for one, find it quite funny and informative. Thank you for posting the entire error, not just a brief summary of what it sort of kind of said. That makes all the difference in debugging stuff.

The problem is that the original function wasn't set up to handle gray space (spaces and tabs) in between numbers and commas. So starting with turret18a, the parser was having trouble. (turret18a, 25.0 , 1.0 would give trouble while turret18a, 25.0, 1.0 would not)

I'm surprised that you're the first person to run into this error.

I've uploaded a build that seems to work with the table excerpt. Have a shot at it and tell me if it works.
-C

 
Re: Error: Optional not working
That solves the problem.  :)

Also note for FRED:
Code: [Select]
Error: Optional not working
File:c:\fs2_open\code\ship\ship.cpp
Line: 4194
[This filename points to the location of a file on the computer that built this executable]

Call stack:
------------------------------------------------------------------
    fred2_open_d-20061130.exe 004dc5b7()
    fred2_open_d-20061130.exe 0054012e()
    fred2_open_d-20061130.exe 004dca1a()
    fred2_open_d-20061130.exe 0044c699()
    fred2_open_d-20061130.exe 004448c7()
    fred2_open_d-20061130.exe 008eb217()
    fred2_open_d-20061130.exe 008eaaae()
    fred2_open_d-20061130.exe 008e8250()
    fred2_open_d-20061130.exe 008e872e()
    USER32.dll 77d48734()
    USER32.dll 77d4d05b()
    USER32.dll 77d4b4c0()
    USER32.dll 77d4fd29()
    ntdll.dll 7c90eae3()
    USER32.dll 77d501f7()
------------------------------------------------------------------
It's too bad it doesn't give the names of the functions on the stack  :blah:


I'll fix my code to clean up those tabs anyways.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"