GMS 2 Glitch I think

Discussion in 'Programming' started by LaughingCow, Apr 7, 2018.

  1. LaughingCow

    LaughingCow Member

    Joined:
    Nov 30, 2017
    Posts:
    116
    Every time I launch the game i get this message
    Object: o_timmbuk2 Event: Create at line 1 : invalid token
    I dont even have anything in my create event for this object
     
  2. TsukaYuriko

    TsukaYuriko Q&A Spawn Camper Forum Staff Moderator

    Joined:
    Apr 21, 2016
    Posts:
    1,616
    Check your game's code for foreign characters. Specific ones may cause issues with the compiler.

    This also applies for any part of file paths used by your game, including the project path.

    Another possibility is that you used an invalid character like a single quote instead of a double quote in GM:S 2.

    When the reported occurrence of an error doesn't match its actual location, I found that it is often located in a room creation or instance creation code. Overflows from the end of one event to the start of another have also happened before.
     
    Joe Ellis likes this.
  3. mdbussen

    mdbussen Member

    Joined:
    Jul 8, 2016
    Posts:
    62
    Did you figure this out yet? I am having the same problem at the moment and its extremely strange so if you were able to report on the root cause of your problem, it might help me debug mine...

    for my situation, the GMS2 compiler was complaining about an "invalid token" on the first line of the create event. I only had a single function call that appeared to be correct (it was even "highlighted" in the correct color in the GMS2 code editor). Nevertheless, when I deleted the contents of this event and re-wrote it, it now compiles and works correctly.

    Very strange; it seems like there must have been some kind of hidden character that was fouling this up, though I have no idea how it might have gotten in there. Regardless, this seemed to fix the issue for me, so if anybody else has a similar problem try deleting the line and re-typing it.
     
  4. Linkdeous

    Linkdeous Member

    Joined:
    Aug 16, 2017
    Posts:
    178
    just delete the create event and recode it, work 99% of the time i got this
     

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