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

The script can't find the TSL

Discussion in 'Bug reports' started by Benualdo, Apr 26, 2020.

  1. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    Did you change something related to spawn in today's update of YnAMP ?
    Code:
    Map Script: WARNING ! No TSL for :     CIVILIZATION_EUROPE    LEADER_MACRON
    The script couln't find the TSL for my civ again so I rollbacked to my previous version that worked but even this one isn't working anymore and I saw there was an update of YnAMP today so just asking.
     
  2. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,323
    Location:
    France
    From modding & Database logs you have a syntax error in TSL/YnAMP.sql
     
  3. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    The log files posted earlier in the thread was about the SQL syntax error you spotted.
    Here are the log file for the error that I have tonight sorry I should have included them in my new post directly to make it clearer.
     

    Attached Files:

  4. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,323
    Location:
    France
    Was testing your mod from steam.

    In the file you've just posted, same error:

    Database:
    [3101201.404] [Gameplay] ERROR: near "(": syntax error

    Modding:
    [3101201.403] UpdateDatabase - Loading TSL/YnAMP.sql
    [3101201.404] Warning: UpdateDatabase - Error Loading SQL.

    note the timestamp that's how you find the source.
     
  5. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    Ah OK makes sense and thanks for this precious tip about timestamps.

    Actually that's weird because I did test the mod before uploading it on Workshop and it was working and it's the same file as before but I rebuiled the solution before uploading so as to update the mod description *confused * :crazyeye:
     
  6. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    Got it ! I don't know how did I manage to do such a thing but I had removed the VALUES keyword in half my .sql files when "cleaning stuff" before uploading the mod on the Workshop ...
    Anyway thanks for the timestamp tip things will be easier to debug now :)

    The Europeans (and the Creusois) are now starting at the correct location again and I'm gonna upload the fix onto the Workshop right now :mischief:



    Thanks a lot for helping me and more broadly for everything you do for the Civ VI modding community and the YnAMP framework. :thumbsup:
     
  7. Benualdo

    Benualdo Chieftain

    Joined:
    Apr 13, 2005
    Messages:
    16
    For reference in case some people jump here trying to fix their TSL problems, here the SQL code to setup my civ starting positions for YnAMP maps :

    Code:
    -- YnAMP
    -- Author: Benoit
    -- DateCreated: 4/26/2020 8:47:27 PM
    --------------------------------------------------------------
    
    CREATE TABLE IF NOT EXISTS StartPosition
    (  
        MapName TEXT,
        MapScript TEXT,     -- to override MapName reference for specific entries in relation to MapScript (like in region of the Largest Earth Map that were heavily modified and can't use the GiantEarth reference)
        Civilization TEXT,
        Leader TEXT,
        DisabledByCivilization TEXT,
        DisabledByLeader TEXT,
        AlternateStart INT default 0,      
        X INT default 0,
        Y INT default 0
    );
    
    INSERT INTO StartPosition (MapName, MapScript, Civilization, Leader, DisabledByCivilization, DisabledByLeader, AlternateStart, X, Y)
    VALUES
    (
        'GreatestEarthMap',        -- MapName
        NULL,                    -- MapScript
        'CIVILIZATION_CREUSE',    -- Civilization
        'LEADER_BUFFY',            -- Leader
        NULL,                    -- DisabledByCivilization
        NULL,                    -- DisabledByLeader
        0,                        -- AlternateStart
        40,                        -- X
        44                        -- Y
    ),
    (
        'LargestEarthCustom',    -- MapName
        NULL,                    -- MapScript
        'CIVILIZATION_CREUSE',    -- Civilization
        'LEADER_BUFFY',            -- Leader
        NULL,                    -- DisabledByCivilization
        NULL,                    -- DisabledByLeader
        0,                        -- AlternateStart
        14,                        -- X
        80                        -- Y
    ),
    (
        'GiantEarth',            -- MapName
        NULL,                    -- MapScript
        'CIVILIZATION_CREUSE',    -- Civilization
        'LEADER_BUFFY',            -- Leader
        NULL,                    -- DisabledByCivilization
        NULL,                    -- DisabledByLeader
        0,                        -- AlternateStart
        11,                        -- X
        63                        -- Y
    ),
    (
        'LargeEurope',            -- MapName
        NULL,                    -- MapScript
        'CIVILIZATION_CREUSE',    -- Civilization
        'LEADER_BUFFY',            -- Leader
        NULL,                    -- DisabledByCivilization
        NULL,                    -- DisabledByLeader
        0,                        -- AlternateStart
        25,                        -- X
        36                        -- Y
    ),
    (
        'PlayEuropeAgain',        -- MapName
        NULL,                    -- MapScript
        'CIVILIZATION_CREUSE',    -- Civilization
        'LEADER_BUFFY',        -- Leader
        NULL,                    -- DisabledByCivilization
        NULL,                    -- DisabledByLeader
        0,                        -- AlternateStart
        28,                        -- X
        48                        -- Y
    );
    
    And for newbies like don't forget to add the SQL files to "UpdateDatabase" for both FrontEnd Actions

    and In-Game Actions
     
    Last edited: Apr 26, 2020
  8. jackehehe

    jackehehe Chieftain

    Joined:
    Jun 28, 2008
    Messages:
    42
    edit: Okay, so I figured out it's probably modbuddy. Still leaves the question, what do I do with it...

    Hey!

    I think this post might answer a question I was about to ask. I've made an Enormous YnAMP map in Worldbuilder that I wanted to play. Problem is, when I load up the map, the game does not respect the starting positions as I set them in world builder. Is this then the work around? And if so, what tool are you using loading the SQL-files? Total noob to modding here.

    Thanks for any help!
     
    Last edited: May 26, 2020
  9. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    9,323
    Location:
    France
  10. jackehehe

    jackehehe Chieftain

    Joined:
    Jun 28, 2008
    Messages:
    42
    Damn, you're fast at replying. Okay, I'll have a look, thanks!
     
  11. jackehehe

    jackehehe Chieftain

    Joined:
    Jun 28, 2008
    Messages:
    42
    Worked like a charm!
     

Share This Page