Author Topic: Missing Required Token: Bitmap  (Read 1708 times)

0 Members and 1 Guest are viewing this topic.

Offline HLD_Prophecy

  • PVD_Hope in a former life
  • 29
Missing Required Token: Bitmap
So I just added a few new weapons to my mod. All are actually based on stock FS2 weapons (The Tempest, the Rebel Bomb, the Cyclops, and the Fusion Mortar).

Upon trying to run FRED, I'm getting several nearly identical errors. They pertain to the weapon based on the Tempest all I changed was the rate of fire by altering the reload time). The first is this:

Code: [Select]
lnd-wep.tbm(line 280):
Error: Missing required token: [+Bitmap:]. Found [;; Trail cannot be set if Exhaust is set] instead.

ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fred2_open_3_7_2_NO-SSE.exe! <no symbol>
fred2_open_3_7_2_NO-SSE.exe! <no symbol>

This same "Missing required token" error is repeated for lines 281, 283, and 286 (twice for 286). Howver, the Bitmap token is present in the table (as it would have to be to run in regular FS2). Can someone please help me out?

Thanks!

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Missing Required Token: Bitmap
Post the table entry, this is usually caused by a misplaced entry or a bad character.

Did you use a non-ANSI text editor (like WordPad) to alter the table?

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Missing Required Token: Bitmap
If the "found" part of those errors start with semicolons, it's almost always because you have an unclosed quotation mark somewhere before the line it's complaining about.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Missing Required Token: Bitmap
Yeah, that looks like a typo in the table. Inspect the entry thoroughly.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Missing Required Token: Bitmap
[;; Trail cannot be set if Exhaust is set] starts with a double semicolon so why is the code reading it?
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Missing Required Token: Bitmap
[;; Trail cannot be set if Exhaust is set] starts with a double semicolon so why is the code reading it?
Short answer:
because you have an unclosed quotation mark somewhere before the line it's complaining about.

Long answer:
FSO's comment-handling code was overhauled, like, a year or so ago so that it ignored semicolons inside of quoted strings. However, other parts of the parsing code don't actually care about whether or not quotation marks are balanced. As a result, an unclosed quotation mark followed by a comment will (usually) result in a parsing error as the comment isn't removed and FSO tries to match the next token it's looking for to something that will not match any token. There's been some talk of overhauling the parsing code itself so that problems like this will lead to error messages that reflect what the actual problem is (e.g. "unclosed quotation mark on line #X"), but this would require rewriting code used all over the codebase and would be a lot of effort, so nobody's done it yet (AFAIK nobody's even started). Until somebody does, you'll get this somewhat odd behavior.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Missing Required Token: Bitmap
ahhh, thanks
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Missing Required Token: Bitmap
If you use a program with smart quotes, like TextEdit, that will **** up your tables.

 

Offline HLD_Prophecy

  • PVD_Hope in a former life
  • 29
Re: Missing Required Token: Bitmap
Thanks all for responding. :)

Here's the culprit entry:

Code: [Select]
$Name:                                  Strafing Tempest
+Title:                                 XSTR("Strafing Tempest", 3317)
+Description:
XSTR(
"Standard Issue
High-Payload Dumbfire", 3318)
$end_multi_text
+Tech Title:    XSTR("Tempest", 3319)
+Tech Anim:    Tech_GTM_MX-6_Tempest
+Tech Description:
XSTR(
"A modified Tempest missile. Fires fast, respectable anti-cruiser type weapon. Used for enemy strikecraft when bombs would be too heavy.", 3320)
$end_multi_text
$Model File: Tempest.pof
$Mass: 0.1
$Velocity: 360.0
$Fire Wait: 0.30
$Damage: 45                                        ;; damage applied when within inner radius
$Blast Force: 0.2
$Inner Radius: 10.0 ;; radius at which damage is full (0 for impact only)
$Outer Radius: 20.0 ;; max radius for attenuated damage (0 for impact only)
$Shockwave Speed: 0                                         ;; velocity of shockwave.  0 for none.
$Armor Factor: 0.9
$Shield Factor: 0.5
$Subsystem Factor: 0.6
$Lifetime: 1.8
$Energy Consumed: 0.0 ;; Energy used when fired
$Cargo Size: 0.25 ;; Amount of space taken up in weapon cargo
$Homing: NO
$LaunchSnd: 90                                        ;; The sound it makes when fired
$ImpactSnd: 88                                        ;; The sound it makes when it hits something
$FlyBySnd: -1
$Rearm Rate: 12.0 ;; number of missiles/sec that are rearmed
$Flags: ("in tech database" "player allowed" huge")                 
$Trail: ;; Trail cannot be set if Exhaust is set
+Start Width: 0.1                                       ;; Width of trail nearest missile
+End Width: 0.2                                       ;; Width of trail before it "evaporates"
+Start Alpha: 1.0
+End Alpha: 0.0
+Max Life: 0.3                                       ;; how many seconds before trail disappears
+Bitmap: newmiss2 ;; Bitmap used to draw trail
$Icon: iconTempest
$Anim: Tempest
$Impact Explosion: ExpMissileHit1
$Impact Explosion Radius: 3.0

Can you guys help me figure out the error? I can't seem to find the problem here...

BTW, I am using Notepad++. It's the way to go.  :yes: Who uses WordPad? :P

 

Offline Axem

  • 211
Re: Missing Required Token: Bitmap
Code: [Select]
$Flags:         ("in tech database" "player allowed" huge")
Code: [Select]
huge")
Someone's missing an " :)

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Missing Required Token: Bitmap
$Flags:         ("in tech database" "player allowed" huge")                 

 

Offline HLD_Prophecy

  • PVD_Hope in a former life
  • 29
Re: Missing Required Token: Bitmap
Code: [Select]
$Flags:         ("in tech database" "player allowed" huge")
Code: [Select]
huge")
Someone's missing an " :)

Took me a few days to get back on this.

Thanks guys! Will fix soon and see if it works.