Results 1 to 5 of 5

Thread: Odd Glitch

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    stoogeofstooges's Avatar Decanus
    Join Date
    Jul 2010
    Location
    Pennsylvania
    Posts
    541

    Default Odd Glitch

    Okay, I just had just finished editing my EDB (adding new units) and I was getting the annoying "unexpected parsing error at line so and so" error in my log file, but I couldn't figure out how to fix it. I dropped the EDB into Excel so I could get a look at the actual chart that the text file was created with, and I found out that the line the error log had specified had been indented too much, even though it didn't look that way in the normal text file. So I moved it back to where it should have been (it was the line "law bonus 3", so I moved it to the same indentation as the other "law bonus" lines for the city barracks) and I saved the Excel file as a .txt file. Now, for some reason, almost every singe line has quote marks at the very beginning and the very end. I tried to run the game and it just sits there on the loading splash screen with the hourglass spinning, and it doesn't actually crash. Is there any way to delete the stupid quote marks or am I going to have to re-do the entire file?

    EDIT: Despite the disappointment, ahem...200TH POST
    Last edited by stoogeofstooges; February 18, 2012 at 10:02 PM.

  2. #2
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Odd Glitch

    In your text editor you could try a find and replace:

    Find: "\r\n"
    Replace: \r\n

    It should work in Notepad++ using the "Extended" search mode.

    You'll need to remove two yourself: the start of the first line and the end of the last.

  3. #3
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Odd Glitch

    Before you try what withwnar suggested about find and replace you should first download and install notepad++ as per withwnar's second suggestion and then start from scratch. Editing the file with excel likely added in a million different pieces of crap hidden information throughout the file that will screw it up completely. DO NOT EVER, EVER, EVER use any Microsoft product to mod files, the only exception to this are the few tools which are spreadsheets that have macros in them. If you get an error you don't know how to fix, post the exact error message(s) (or log in its entirety) here and the file that generates the error message. You're less likely to screw things up and have to redo everything from scratch.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  4. #4
    stoogeofstooges's Avatar Decanus
    Join Date
    Jul 2010
    Location
    Pennsylvania
    Posts
    541

    Default Re: Odd Glitch

    Okay, i can't get notepad++ since its not for mac and doesn't work on crossover, but I found something basically the same for mac: TextWrangler. I had already begun to start from scratch, and I'm still getting the "unexpected parcing error at line so and so", not on the same exact line as before, but it'll just show up when all I'll do is go to the end of a recruit_pool entry, click enter, hit tab twice to line up with the rest of the lines, then paste in my new unit entry. I managed to get it working once, but I accidentally deleted the file while trying to get something else to work. Yeah, I know, I was horrified at myself.

  5. #5
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Odd Glitch

    Wow, I was thinking just the other day whether anyone does this on a mac and whether it creates problems.

    Mac newline characters are LF (line feed) whereas in Windows they are CRLF (carriage return then line feed). Occasionally a file I'm editing (on Windows) ends up with just LF in a few places and the game freaks out. So I assume that M2TW requires CRLF not LF.

    I'm guessing that each time you hit the Enter button at the end of a line you are inserting an LF. If so then the editor might let you convert them all somehow (e.g. Notepad++ has an "EOL Conversion" function), possibly during the save, or perhaps let you treat this file as a "Windows" format one so it inserts CRLFs instead of LFs.

    Your editor might let you see the newline characters. Notepad++ does it via "show special characters"...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •