Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Dark Hunter on March 16, 2006, 09:25:51 pm

Title: Ships tbl error
Post by: Dark Hunter on March 16, 2006, 09:25:51 pm
I got a weird error trying to run FSopen in the ships.tbl:

Error: Expecting int, found [, "Tornado",  "Harpoon")].

Second error:

Error: Expecting int, found [, "Harpoon")].


Both were in ships.tbl(892)

Got them apparently from installing the "Nightmare" fighter entry to the table, since it worked before that and the Nightmare Destroyer (installed at about the same time) isn't having problems. Any ideas on how to fix?
Title: Re: Ships tbl error
Post by: karajorma on March 17, 2006, 05:35:53 am
What it's saying is that the game was parsing the ships table and was expecting to find an integer number (a whole number as opposed to one with a decimal point) but instead found the "tornado" and "Harpoon" entries instead.

That probably means you have some entries out of the correct order or something. Compare the entry with the one for a working ship around the $Allowed SBanks: section.

If you post that part of the table it will probably be fairly easy for someone to spot the problem if that isn't enough to help.
Title: Re: Ships tbl error
Post by: Dark Hunter on March 17, 2006, 12:10:16 pm
Here is the table data for the Nightmare fighter.
 Don't  know whether location is important, I put it at the end of the Shivan fighters, right before the SB Nephilim.


$Name:         Nightmare Fighter
$Short name:      NFighter1
$Species:         Shivan
+Tech Description:
XSTR(
"The Nightmare fighter is more commonly referred to as a 'swarmer'.  Small, weak, but well armed and agile, these fighters can overwhelm foes in seconds when used in swarms of 6 or 12.  The GTVI has theorised that these fighters may be advanced drones, but this cannot be confrimed until one is captured.", 3142)
$end_multi_text
$POF file:         nfighter01.pof
$Detail distance:      (0, 200, 600, 700)
$Show damage:      YES
$Density:         1
$Damp:         0.2
$Rotdamp:         0.2
$Max Velocity:      25.0, 25.0, 95.0
$Rotation time:      3.0, 3.0, 3.0
$Rear Velocity:      25.0
$Forward accel:      3.0
$Forward decel:      1.5
$Slide accel:      2.0
$Slide decel:      2.0
$Expl inner rad:      15.0
$Expl outer rad:      55.0
$Expl damage:      15.0
$Expl blast:      1000.0
$Expl Propagates:      NO
$Shockwave Speed:      0.0
$Default PBanks:      ( "Nightmare Fighter Laser" )
$Default SBanks:      ( "Nightmare Missile Swarm")
$SBank Capacity:      ( 100 )
$Shields:         200
$Shield Color:      255 64 255
$Power Output:      1.5
$Max Oclk Speed:      120.0
$Max Weapon Eng:      100.0
$Hitpoints:         75
$Flags:         ( "fighter" )
$AI Class:         NightmareNorm
$Afterburner:      YES
   +Aburn Max Vel:   0.0, 0.0, 195.0
   +Aburn For accel:   0.7
   +Aburn Fuel:   300.0
   +Aburn Burn Rate:   70.0
   +Aburn Rec Rate:   25.0
$Countermeasures:      20
$Scan time:         2000
$EngineSnd:         132
$Closeup_pos:      0.0, 0.0, -28
$Closeup_zoom:      0.5
$Shield_icon:      shieldNfight1
$Score:         15
$Trail:
   +Offset:      0.255 -3.76 2.7
   +Start Width:   0.25
   +End Width:      0.05
   +Start Alpha:   1.0
   +End Alpha:      0.0
   +Max Life:      1.0
   +Spew Time:      120
   +Bitmap:      Contrail01
$Trail:
   +Offset:      0.66 -3.76 2.7
   +Start Width:   0.25
   +End Width:      0.05
   +Start Alpha:   1.0
   +End Alpha:      0.0
   +Max Life:      1.0
   +Spew Time:      120
   +Bitmap:      Contrail01
$Trail:
   +Offset:      -4.49 4.079 2.64
   +Start Width:   0.25
   +End Width:      0.05
   +Start Alpha:   1.0
   +End Alpha:      0.0
   +Max Life:      1.0
   +Spew Time:      120
   +Bitmap:      Contrail01
$Trail:
   +Offset:      5.37 4.1 2.6
   +Start Width:   0.25
   +End Width:      0.05
   +Start Alpha:   1.0
   +End Alpha:      0.0
   +Max Life:      1.0
   +Spew Time:      120
   +Bitmap:      Contrail01
$Subsystem:         sensors,      10,0.0
$Subsystem:         communications,   10,0.0
$Subsystem:         engine,      35,0.0
$Subsystem:         weapons,      15,0.0
$Subsystem:         navigation,      5,0.0

One final note is that the game seems to run perfectly fine even wth these errors....
Title: Re: Ships tbl error
Post by: karajorma on March 17, 2006, 12:16:13 pm
Odd. You've got no allowed Pbanks entries. I can't say for definate you need them but I've not seen an entry without them before.
Title: Re: Ships tbl error
Post by: Wanderer on March 17, 2006, 12:26:19 pm
:nervous: karajorma, all shivan fighters and bombers in stock fs2 tables lack those entries

SF Basilisk
Code: [Select]
...
$Shockwave Speed:       0.0                                             ;; speed shockwave expands at, 0 means no shockwave
$Default PBanks:        (       "Shivan Mega Laser" "Shivan Heavy Laser" )
$Default SBanks:        ( "Trebuchet" "Hornet" )
$SBank Capacity:        ( 80, 80 )
...

Dark Hunter, open the ships.tbl in notepad or somesuch and search your ships.tbl for that , "Tornado",  "Harpoon" entry and post the line where that appears here
Title: Re: Ships tbl error
Post by: karajorma on March 17, 2006, 12:59:44 pm
:nervous: karajorma, all shivan fighters and bombers in stock fs2 tables lack those entries

Proof that my expertise lies in FREDding and not tabling :)

The first post is correct though. The error message is telling you exactly what it's expecting to find and what it is actually finding.
Title: Re: Ships tbl error
Post by: Dark Hunter on March 17, 2006, 03:17:50 pm
Ran a Crtl-F search several times and it couldn't find the entry........... maybe its worded wrong. In any case I don't see how this would help too much since "Tornado" and "Harpoon" entries are all over Vasudan and Terran fighters....
Title: Re: Ships tbl error
Post by: Dark Hunter on March 17, 2006, 03:22:38 pm
Ok just went through every single tornado entry and all of them are in the Allowed SBanks entires for Terran and Vasudan fighters. There are none in Shivan fighters.
Title: Re: Ships tbl error
Post by: StratComm on March 17, 2006, 03:32:12 pm
Shouldn't be.  They should only be allowed on Terran and Vasudan craft.  What I'd suggest trying is searching your table for the exact phrase in the first set of brackets in the error message you posted here specifically

, "Tornado",  "Harpoon")

and that will narrow down the possible points that could be causing the error.  It's probably a syntax error on one of those lines, or at least that's where I'd start looking.  You may check what comes immediately before them, as it's possible that this is just some kind of cut-and-paste error.  Or spelling; it could be that too.
Title: Re: Ships tbl error
Post by: Dark Hunter on March 17, 2006, 06:52:51 pm
It didn't find a single entry.........
Title: Re: Ships tbl error
Post by: StratComm on March 17, 2006, 07:38:49 pm
It wouldn't have found it if it's not there.  Make sure you're searching on the right terms (no extra spaces or brackets; the square brackets shouldn't be part of your search while the last closing parenthesis should be), and then make sure to check for modular tables.  That error is generated straight out of the tables, so it can't tell you something that isn't there.
Title: Re: Ships tbl error
Post by: Wanderer on March 17, 2006, 11:59:14 pm
If you have some sort of editor that is kind enough of to show the line numbers open the ships.tbl in there and check the lines around the line 892 and infact the whole entry where that line belongs to.
Title: Re: Ships tbl error
Post by: StratComm on March 18, 2006, 01:25:23 am
Those line numbers are usually code line numbers though, unless that's changed recently.
Title: Re: Ships tbl error
Post by: Wanderer on March 18, 2006, 01:34:18 am
I usually get two line numbers... one which refers to the line of the code and another one that points to the line in the table file
Title: Re: Ships tbl error
Post by: Dark Hunter on March 18, 2006, 03:53:26 pm
I just replaced the bad table with the original and now everything works great (except the Nightmare fighter doesn't work, but seeing as it didn't work before that's not too much of a loss.)
Title: Re: Ships tbl error
Post by: StratComm on March 18, 2006, 08:33:49 pm
You may try using modular tables to add the fighter.  That way you can add it to any campaign without worrying about anything besides the class count limit.
Title: Re: Ships tbl error
Post by: Dark Hunter on March 18, 2006, 09:09:04 pm
I'm a little unfamiliar as to modular tables. I added that entry using the handy "copy and paste" method. :D

How exactly are they different from "normal" table entries?
Title: Re: Ships tbl error
Post by: StratComm on March 18, 2006, 09:42:56 pm
They are a seperate file, and will add the ship in to any valid ships table.  All you need to do is name the file with -shp.tbm at the end and make sure you have "#Ship Classes" at the beginning, your table entry in the middle, and "#End" at the end of the file itself.  I believe the Wiki entry on modular tables is fairly informative, so you may look there if you need pointers.
Title: Re: Ships tbl error
Post by: Dark Hunter on March 18, 2006, 10:19:44 pm
Ah, I saw one of those in Derelict's VP.   I see maybe I'll try it.