1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Unexpected symbol near ''

Discussion in 'Civ5 - SDK / LUA' started by killmeplease, Oct 19, 2010.

  1. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    This error has halted my modding. I've wasted 2 days trying to deal with it. But have no success yet.

    Please help!
    WTF is this :confused:
     

    Attached Files:

  2. JeBuS27

    JeBuS27 Heretic

    Joined:
    Sep 21, 2005
    Messages:
    321
    In one of your files, in the very first line, there's an unknown character.
     
  3. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    the firs line is a comment. i also tried to delete first lines and all the stuff except one function, and even create a new file and retype the code, but it keeps showing that error.
    when i remove file from project all goes well. but this is not a solution really :)
    file attached.
     

    Attached Files:

  4. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    Are you using some other editor than the standard Lua editor in ModBuddy? Because, given the stated location and the fact it's there even if you remove the existing first line, it sounds like it could be a UTF-8 BOM (byte-order mark), and the Lua interpreter is choking on it for some reason. What character set support does the Lua interpreter have, anyway?
     
  5. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    I copy from WinQLua window at times
    But as i said i tried to create a new file in ModBuddy and retype all the code and this does not help :(
     
  6. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    Does your script include any characters that would be multibyte in UTF-8? Or, to be easier to answer, does it contain any non-ascii characters (for example, non-$ currency symbols, accented letters, cyrillic or greek letters, oriental characters)? Try removing those and keeping to 7-bit ascii characters.
     
  7. killmeplease

    killmeplease Mk Z on Steam

    Joined:
    Nov 22, 2007
    Messages:
    2,794
    Location:
    Samara
    Yeah it was in unicod :blush:
    My bad!

    Thanks to all!
     

Share This Page