goldencow2 / 18Engine

A plug-and-play script that can be added to any 18XX mod on TTS with no scripting knowledge.
GNU General Public License v3.0
4 stars 3 forks source link

Version 2.96 - Setting USE_SAVES = true gives me an errors on each autosave. #7

Closed shazzner closed 1 year ago

shazzner commented 1 year ago

Making a TTS mod for 18Svea (well adding 18Engine for an existing mod), everything works correctly except when I set USE_SAVES to true. I get an error every 5 seconds or so saying: chunk_3:(166,8-169,0): attempt to index a nil value <27> or some variation. The mod itself is fairly simple:

gameOptions = {
            TRANSACTION_LOG_GUID = '778114',
            CHARTER_SHARES_PAY_COMPANY = true,
            SHARE_DESCRIPTIONS_ARE_PERCENTAGE = true, 
}

gameEntities = {
    COMPANIES = {
            ['Jonkoping'] = {
                inputCounterGUID = '184aa4',
                moneyLabelGUID = '45a301',
                charterGUID = 'ebf5d8',
            },

            ['Orebro'] = {
                inputCounterGUID = '101f76',
                moneyLabelGUID = 'de666a',
                charterGUID = '86d157',
            },

            ['Stockholm'] = {
                inputCounterGUID = '1ff316',
                moneyLabelGUID = 'e245fd',
                charterGUID = '3a6915',
            },

            ['Norrkoping'] = {
                inputCounterGUID = 'c1bd32',
                moneyLabelGUID = '009338',
                charterGUID = '976808',
            },

            ['Goteborg'] = {
                inputCounterGUID = '6095bf',
                moneyLabelGUID = 'b90f30',
                charterGUID = 'dd5094',
            },

            --- etc.

    }, PLAYERS = {
            ['Red'] = {
                inputCounterGUID = 'f6fd2e',
                moneyLabelGUID = '84f3fa',
            },

            ['Green'] = {
                inputCounterGUID = '461a92',
                moneyLabelGUID = '41571c',
            },

            ['Blue'] = {
                inputCounterGUID = 'a6fc29',
                moneyLabelGUID = '79b9db',
            },

            --- etc.

    }
}

Any ideas?

shazzner commented 1 year ago

Apologies, looks like I deleted OTHER_ACTORS from the gameEntities, which caused the errors. Closing!