Community Forum

Error: Running LUA Method 'update'

Forum Overview >> Scripting

CategoryScripting
Created28.11.2018 11:24


Onur Ekici (onurekici) 28.11.2018 11:24
Hello,

In my log, i get an error for all store items. - Error: Running LUA method 'update'. dataS/scripts/placeables/BgaPlaceable.lua(248) : attempt to index local 'storeItem' (a nil value) -

I really appreciate any help.

Bilbo Beutlin (BBeutlin) 28.11.2018 11:43
The GE generates with "New Mod from Game" beneath other the files "defaultItems.xml" and "defaultVehicles.xml". These contain file pathes with filename="$data/..". Replace all these with filename="data/.." and it should work.
There's somewhere a bug in the $data evaluation.

Onur Ekici (onurekici) 28.11.2018 12:16
Thank you Bilbo.
Replacing "$data/" with "data/" not working.

Bilbo Beutlin (BBeutlin) 28.11.2018 12:54
Of course this works only if you start a new game/career.

All (pre-placed) placeables are in the "defaultItems.xml". Check there whether they are present actually.

Is the store and its icon existing on your map?
Does it work if you call the store by hotkey?

Ken Poth (pothk) 08.12.2018 00:41
i cleaned up a bunch of erros but now getting this one: 2018-12-06 22:09 Error: Running LUA method 'update'.
2018-12-06 22:09 dataS/scripts/placeables/BgaPlaceable.lua(248) : attempt to index local 'storeItem' (a nil value)

Bilbo Beutlin (BBeutlin) 08.12.2018 01:01
Is this the only error in the log? Nothing with "couldn't read (file)" or similiar?

Is the bga registered in modDesc <storeItems> ?

Ken Poth (pothk) 08.12.2018 01:20
not in the mod desc just in the default items xml,


Bilbo Beutlin (BBeutlin) 08.12.2018 01:46
Some items have to be included in the ModDesc also - just bga, farmBuildings, ..
Download and examine the Giants map "Estancia Lapacho" for reference.

Ken Poth (pothk) 08.12.2018 02:05
thanks i will do that

Ken Poth (pothk) 09.12.2018 00:44
so any idea why the system would add an extra "map" folder. my placeables folder is in maps/placeables but the game wants to look in maps/maps

see error below

2018-12-08 17:37 Error: Failed to open xml file 'C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/mapUS.xml'.
2018-12-08 17:37 LUA call stack:
2018-12-08 17:37 dataS/scripts/utils/Utils.lua (353) : printCallstack
2018-12-08 17:37 dataS/scripts/missions/mission00.lua (78) : getFilename
2018-12-08 17:37 dataS/scripts/events.lua (38) : setMissionInfo
2018-12-08 17:37 dataS/scripts/misc/AsyncManager.lua (42) : lambda
2018-12-08 17:37 dataS/scripts/misc/AsyncManager.lua (119) : runLambda
2018-12-08 17:37 dataS/scripts/misc/DeferredLoadingManager.lua (39) : runTopTask
2018-12-08 17:37 dataS/scripts/main.lua (1813) : update
2018-12-08 17:37 Error: Failed to open xml file 'C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/mapUS/farmBuildings/farmHouse.xml'.
2018-12-08 17:37 Error (C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/mapUS/farmBuildings/farmHouse.xml): No storeData found. StoreItem will be ignored!
2018-12-08 17:37 Error: Failed to open xml file 'C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/mapUS/farmBuildings/farmBarn.xml'.
2018-12-08 17:37 Error (C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/mapUS/farmBuildings/farmBarn.xml): No storeData found. StoreItem will be ignored!
2018-12-08 17:37 Error: Failed to open xml file 'C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/mapUS/bga/bga.xml'.
2018-12-08 17:37 Error (C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/mapUS/bga/bga.xml): No storeData found. StoreItem will be ignored!
2018-12-08 17:37 Error: Failed to open xml file 'C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/farmSilos/farmSiloLarge.xml'.
2018-12-08 17:37 Error (C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/farmSilos/farmSiloLarge.xml): No storeData found. StoreItem will be ignored!
2018-12-08 17:37 Error: Failed to open xml file 'C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/mapUS/waterFillTriggers/waterFillTriggers.xml'.
2018-12-08 17:37 Error (C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/mapUS/waterFillTriggers/waterFillTriggers.xml): No storeData found. StoreItem will be ignored!
2018-12-08 17:37 Error: Failed to open xml file 'C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/farmSilos/farmSiloSmall.xml'.
2018-12-08 17:37 Error (C:/Users/Ken/Desktop/New folder (2)/Ravenport2/maps/maps/placeables/farmSilos/farmSiloSmall.xml): No storeData found. StoreItem will be ignored!

Bilbo Beutlin (BBeutlin) 09.12.2018 01:14
Did you create the map with GE "new mod from game" and answered the query "get parent directory structure" with YES? This will create the folders in a different order.
For normal mods/maps you should deny "parent directory structure".

Ken Poth (pothk) 09.12.2018 01:45
actually what i did was i made a standard size mod map from ravenport using the new mod from game in GE, did some tweaking and got it working with no errors, then I copied the map into a new folder, resized the dem file and the weight files for a 4x map, file structure was the same as the single size map but got those errors. so not sure what the deal is.

Bilbo Beutlin (BBeutlin) 09.12.2018 02:07
And you want to play the map which is still on your desktop? no no - that doesn't work.
You can edit on desktop (with GE). But for game the map must be in the FS19 mod folder.

So I'm quite sure, you have accepted "parent directory structure" and this writes the file pathes where you have edited.

Ben Sollis (sollisb) 11.12.2018 08:18
Spaces in path names are never a good start.
Make sure all paths are implicit to target ../../. rather than explicit paths
Delete any save game related to the map being tested
Retest
Stick to the first error and get that fixed
The rest will more than likely start to come online

Andrei Sprinseana (xsenio) 12.12.2018 09:48



Note: Log in to post. Create a new account here.