|Nolan Carl (nolangene)||15.12.2018 06:27|
|I have been trying to add a new configuration to FS19 so I can use it in a mod. Can be anything Logo, numbers, etc. Keeping it as simple as I can. Trying to use:
ConfigurationManager.addConfigurationType("Logo", "configuration_Logo", nil, nil, nil, ConfigurationManager.SELECTOR_MULTIOPTION);
The error that I am getting is:
dataS/scripts/vehicles/ConfigurationManager.lua(41) : attempt to index field 'configurations' (a nil value)
Going to keep pounding my head on the wall. But could use any suggestions! Thanks in advance!
|Nolan Carl (nolangene)||20.12.2018 06:20|
|While I am new to modding, I have been part of other programming level forums. The lack of response from this forum or from Giants in general is disappointing. I have pointed out obvious errors in the LUA documentation but no response at all and the error is still there. Apparently the notion that Giants or the Forum is here to help is very lacking. I ask this question and get nothing. Others ask simple questions and get answers. Oh well I guess you are too busy and can only respond to some simple questions. I thought this was simple but I guess not.
|Espen K. (estyx)||20.12.2018 19:24|
|I know your frustration with the current documentation, and since release day I have spent time making my own scripts to find functions, classes etc that even still has not been included on this site. I have also made scripts to observe function calls to examine both arguments and results. Some of it is available on GitHub. I made a short code snippet for you:
It's cut out from my own code library I'm using these days, but I didn't test this one specific code snippet so there may be some type error(s).
|Nolan Carl (nolangene)||21.12.2018 03:21|
|Thank you very much for the reply water in the desert.I will take a look and again thank you very much for the response.
|Jos Kuijpers (Unknown)||02.01.2019 15:44|
|For all the '...Manager' classes you need to use its instance variant:
ConfigurationManager -> g_configurationManager
VehicleTypeManager -> g_vehicleTypeManager.
Its an instance, so also use the colon instead of dot:
g_configurationManager:addConfigurationType("Logo", "configuration_Logo", nil, nil, nil, ConfigurationManager.SELECTOR_MULTIOPTION);
that should resolve the error
Note: Log in to post. Create a new account here.