1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

Question - Code Any way to add semicolons automatically?

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Nodamex, Nov 21, 2018.

  1. Nodamex

    Nodamex Member

    Joined:
    Jul 14, 2016
    Posts:
    26
    Is there any way to add semicolons properly for 80.000 lines of GML code for using YYC? I can predict that it will be hard, but may be some of you offer me a solution that makes it a little bit easier.
     
  2. csanyk

    csanyk Member

    Joined:
    Jun 20, 2016
    Posts:
    821
    Short of writing a program that can parse your GML out and add them, I don't think so. It'd be kinda tough to write it unless you're very familiar with string manipulation AND GML syntax rules.

    But this makes me think: One thing that would be pretty awesome would be a config option in the code editor to treat missing semi-colons as a syntax warning, and highlight the missing space where they belong.
     
    Guest likes this.
  3. obscene

    obscene Member

    Joined:
    Jun 21, 2016
    Posts:
    2,469
    Search for "var" and make sure you have semicolons on all those lines. The rest probably won't matter but those absolutely can cause strange things.
     
  4. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    2,445
    As of the current versions, semicolons shouldn't matter for YYC - you can verify by comparing a .cpp file generated for GML file with semicolons versus one for a GML file without any
     
  5. Marcus12321

    Marcus12321 Member

    Joined:
    Aug 29, 2018
    Posts:
    90
    Open in a text program, do a find/replace for the CR/LF character?!?!

    Just a suggestion, might get you close.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice