Author Topic: Tabs inserted into missions cause problems.  (Read 1520 times)

0 Members and 1 Guest are viewing this topic.

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Tabs inserted into missions cause problems.
I've noticed sometimes that FS has errors if there are too many tabs in a line, as it disregards that line and moves on to the next.  (or just merges that line and the next.)  I remember when I was helping my brother script some missions, sometimes when you saved them in FRED, the tabs would get inserted somehow, and you had to open them in Notepad to get rid of them and fix the mission.  Otherwise, FRED just disregarded the affected line, and if you found that your event or whatever disappeared, and put it in again, it would append it as a second line after the ruined one.  Again, a few tabs don't seem to bother it, but when you have 7 or 8... it also causes FS to crash, I believe... It's been awhile since I tinkered with FRED, but seeing the following reminded me:

Code: [Select]
$Max Velocity:            90.0, 90.0, 90.0
$Rotation time:           3.8, 3.8, 3.1
$Rear Velocity:           90.0
$Forward accel:           3.0
$Forward decel:           3.0
$Slide accel:             1.2
$Slide decel:             1.2
$Glide:  YES


The three squares after $Glide: are tabs, if they show up.  You might notice, there are not three tabs' worth of space between "$Glide:" and "YES".  But anyways, has anyone else noticed this?  If you're having trouble with FRED losing your changes to your mission, or corrupting, try opening it in Notepad and see if there are little squares scattered in there somewhere.  I'm not sure if this is a Windows bug, FS bug, FRED bug, or what, but I remember that it drove me & my brother up the wall.  (I think back when I was trying to port some old FS1 missions, sometimes they were inserted at the top, as well.)

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Tabs inserted into missions cause problems.
I usually reformat everything. While it's nice to have a colum like layout like the above for "readability" I guess, this isn't a frakkin spread sheet. One tab, period, but frankly single spacing works just as beautifully.

Code: [Select]
$Max Velocity: 90.0, 90.0, 90.0
$Rotation time: 3.8, 3.8, 3.1
$Rear Velocity: 90.0
$Forward accel: 3.0
$Forward decel: 3.0
$Slide accel: 1.2
$Slide decel: 1.2
$Glide: YES

Is what mine looks like and not only do I not have any problems with it, you can get used to it after awhile. That and a single space reserves less data in a file than a tab space, so when you replace multiple tabs in a file with single spaces, you can reduce the overall file size to a nice degree. That, and the processor doesn't care about the spaces and while there is no timely advantage of making it perceptibaly _faster_, that's not the point. It's efficient.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Tabs inserted into missions cause problems.
A real man doesn't use any unneccessary spaces, line breaks, decimal points, comments, and always loads his tables up in a hex editor to convert notepad's "\r\n" sequence to "\n".

Anyone up for an obfuscated tables contest? :D
-C

 
Re: Tabs inserted into missions cause problems.
hex editor? thats for wimps... real men use magnets and shift the bits polarity  :p
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 jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: Tabs inserted into missions cause problems.
I usually reformat everything. While it's nice to have a colum like layout like the above for "readability" I guess, this isn't a frakkin spread sheet. One tab, period, but frankly single spacing works just as beautifully.
Heh... no, you misunderstand me... I had to use Notepad to get rid of the tabs that the stupid FSM converter / FRED inserted without asking me... for some reason, it kept inserting extra tabs, and when they built up enough, FS wouldn't process the line they were on, or sometimes merged two lines together... it was rather weird.  What I was trying to say, was that if a mission that worked fine goes awry, and you undo the change you made, and it's still broken, or gets worse, there's probably a rogue line of tabs (or two or three) stuck in there.  Unless I'm the only one that this has happened to.
hex editor? thats for wimps... real men use magnets and shift the bits polarity  :p
That's some micro-magnet you've got there... got a pair of micro-tweezers to pick it up with?  :lol: