Fehler im Lua-System

Bitte berichtet uns über neu gefundene Bugs in diesem Forum und stellt sicher, dass ihr diesen Bug reproduzieren könnt.
Ihr könnt mehr Informationen im Thread "So meldet ihr einen Bug" finden.
User avatar
kevink98
Posts: 170
Joined: Thu Jul 23, 2015 3:29 pm
Contact:

Fehler im Lua-System

Post by kevink98 » Sat Nov 02, 2019 7:49 pm

Nachdem ich nun schon sehr lange (sind bestimmt schon über 2 Jahre) behauptet habe, dass es im LUA-System ein Fehler, hab ich nun heute endlich den Beweis dafür!

Behauptung: In der Log kommen Fehlermeldungen, wenn eine Variable nil ist. Die Variable ist dabei aber nicht nil, sondern ist initialisiert.

Lösung: Bisher konnte man das Problem lösen, wenn man die Variable ausgeprintet hat. Mit dem unten stehenden Code funktioniert das leider nichtmehr. Aber so hab ich endlich den Beweis :biggrin2:

Das ist mein Code:
Image

Image

Das ist meine erste Log:
GIANTS Engine Runtime 8.0.0 (20335) 64bit (Build Date: Oct 2 2019)
Copyright (c) 2008-2019, GIANTS Software GmbH (giants-software.com), All Rights Reserved.
Copyright (c) 2003-2019, Christian Ammann and Stefan Geiger, All Rights Reserved.
Application: FarmingSimulator2019
Main System
CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 16267 MB
OS: Windows NT 10.0 64-bit
Physics System
Version: 5.9.5
Thread(s): 2
Input System
Keyboard enabled
Mouse enabled
Gamepad/Joystick enabled
Force Feedback disabled
Devices:
XINPUT_GAMEPAD
Number of Axes: 6
Number of Buttons: 14
Audio System
Driver: SoftMixer WASAPI Stereo
Version: 2018.11
Frequency: 48000
Max. active sources: 256
Render System
Driver: Direct 3D 11
Card Vendor: NVIDIA Corporation
Renderer: NVIDIA GeForce GTX 1050
Version: 26.21.14.3160 (17.7.2019)
Revision: 161
Feature level: DirectX 11
Windowed Mode : off
V-Sync : on
Effective Window Resolution: 1920 x 1080
Started 3 threads for threadpool 'Render threadpool'
Hardware Profile
Level: Custom Very High
View Distance Factor: 2.000000
Shadow Quality: 2.000000 Base-Size: 2048 Filter-Size: 16 Shadow Focus Box true
Shader Quality: 3
Skip Mipmaps: 0
LOD Distance Factor: 2.000000
Terrain LOD Distance Factor: 2.000000
Terrain Normal Mapping: Yes
Foliage View Distance Factor: 2.000000
Volume Mesh Tessellation Factor: 0.500000
Tyre Tracks Segments Factor: 4.000000
Max. Number of Shadow Lights: 8
Max. Number of Lights: 512
Max. Number of Lights Per Cluster: 32
MSAA: 1
Bloom Quality: 5
SSAO Quality: 15
DOF: Enabled
Cloud Quality: 4
EnvMap Blending: Enabled
Setting 'Master Volume': 0.10000000149012
Setting 'Is Train Tabbable': false
Setting 'Radio Vehicle Only': false
Setting 'Radio Active': false
Setting 'Use Colorblind Mode': false
Setting 'Easy Arm Control': true
Setting 'Show Trigger Marker': true
Setting 'Show Field-Info': true
Setting 'Invert Y-Look': false
Setting 'Show Help Icons': true
Setting 'Radio Volume': 0.80000001192093
Setting 'Vehicle Volume': 1
Setting 'Environment Volume': 1
Setting 'GUI Volume': 0.89999997615814
Setting 'Master Volume': 0.10000000149012
Setting 'Music Volume': 0.69999998807907
Farming Simulator 19
Version: 1.5.1.0 b6730
Available Languages: en de jp pl cz fr es ru it pt hu nl cs ct br tr ro kr
Language: de
Time: 2019-11-02 19:23:42
Cheats: Enabled
Load dlc: pdlc_claasPack (Version: 1.1.0.0) (Hash: 5e04ad19d7453580219d06e16101c079)
Load mod: FS19_EasyDevControls (Version: 1.0.0.0) (Hash: 226943e73eee43672d959ff830d4f6f6)
Load mod: FS19_GlobalCompany (Version: 1.1.2.2)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompany to use it in multiplayer.
dataS2/character/humans/characterAnimation.i3d (73.33 ms)
Load mod: FS19_GlobalCompanyAddOn_Bank (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_Bank to use it in multiplayer.
Load mod: FS19_GlobalCompanyAddOn_FieldLease (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_FieldLease to use it in multiplayer.
Load mod: FS19_GlobalCompanyAddOn_GreenSeeker (Version: 1.0.0.0)
dataS2/character/humans/pedestrians/pedestrianAnimation.i3d (34.35 ms)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_GreenSeeker to use it in multiplayer.
Load mod: FS19_GlobalCompanyAddOn_Icons (Version: 1.0.1.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_Icons to use it in multiplayer.
Load mod: FS19_GlobalCompanyAddOn_OrganicSoilManagement (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_OrganicSoilManagement to use it in multiplayer.
Load mod: FS19_GlobalCompanyAddOn_TreeMarker (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_TreeMarker to use it in multiplayer.
Load mod: FS19_GlobalCompanyPlaceable_BGA_GrimmeBeetBeater (Version: 1.0.1.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyPlaceable_BGA_GrimmeBeetBeater to use it in multiplayer.
Load mod: FS19_GlobalCompanyPlaceable_DynamicStorageHall (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyPlaceable_DynamicStorageHall to use it in multiplayer.
Load mod: FS19_GlobalCompanyPlaceable_FermentingSilo (Version: 1.0.1.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyPlaceable_FermentingSilo to use it in multiplayer.
Load mod: FS19_GlobalCompanyPlaceable_PlaceableDisplay (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyPlaceable_PlaceableDisplay to use it in multiplayer.
Load mod: FS19_GlobalCompanyPlaceable_SeedMaker (Version: 1.0.1.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyPlaceable_SeedMaker to use it in multiplayer.
Load mod: FS19_Irgendwo_in_Thueringen_2 (Version: 2.0.0.0) (Hash: 103b47d860e0294594d5dc4097877b86)
Load mod: FS19_RM_Seasons (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_RM_Seasons to use it in multiplayer.
Error: Failed to open xml file 'C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS21_Stappenbach/modDesc.xml'.
Load mod: FS21_Stappenbach
Error: Missing descVersion attribute in mod FS21_Stappenbach
2019-11-02 19:23 Error: Can't load resource 'C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompanyAddOn_FieldLease/globalCompanyAddOn_Bank.dds'.
2019-11-02 19:23 Loaded specializations
2019-11-02 19:23 Loaded vehicle types
2019-11-02 19:23 Loaded placeable types
2019-11-02 19:23 Loaded Easy Development Controls
2019-11-02 19:23 [LSMC - GlobalCompany] - [GlobalCompany > GC_languageManager]
2019-11-02 19:23 DEVELOPMENT: Standard language XML file has been loaded successfully.
2019-11-02 19:23 [LSMC - GlobalCompany] - Loading Developer-Version: 1.1.2.2 (01.11.2019)
2019-11-02 19:23 [LSMC - GlobalCompany] - [GlobalCompany > GC_languageManager]
2019-11-02 19:23 INFORMATION: '1' mod language XML files have been loaded successfully.
2019-11-02 19:23 Register configuration 'baseColor'
2019-11-02 19:23 Register configuration 'design'
2019-11-02 19:23 Register configuration 'designColor'
2019-11-02 19:23 Register configuration 'vehicleType'
2019-11-02 19:23 Register workAreaType 'RIDGEMARKER'
2019-11-02 19:23 Register configuration 'attacherJoint'
2019-11-02 19:23 Register workAreaType 'WEEDER'
2019-11-02 19:23 Register workAreaType 'PLOW'
2019-11-02 19:23 Register workAreaType 'DEFAULT'
2019-11-02 19:23 Register workAreaType 'AUXILIARY'
2019-11-02 19:23 Register configuration 'motor'
2019-11-02 19:23 Register configuration 'frontloader'
2019-11-02 19:23 Register workAreaType 'FORAGEWAGON'
2019-11-02 19:23 Register configuration 'baseMaterial'
2019-11-02 19:23 Register configuration 'designMaterial'
2019-11-02 19:23 Register configuration 'wrappingColor'
2019-11-02 19:23 Register configuration 'powerTakeOff'
2019-11-02 19:23 Register configuration 'trailer'
2019-11-02 19:23 Register workAreaType 'COMBINECHOPPER'
2019-11-02 19:23 Register workAreaType 'COMBINESWATH'
2019-11-02 19:23 Register workAreaType 'FRUITPREPARER'
2019-11-02 19:23 Register workAreaType 'BALER'
2019-11-02 19:23 Register configuration 'tensionBelts'
2019-11-02 19:23 Register workAreaType 'MOWER'
2019-11-02 19:23 Register workAreaType 'CULTIVATOR'
2019-11-02 19:23 Register workAreaType 'SPRAYER'
2019-11-02 19:23 Register configuration 'wheel'
2019-11-02 19:23 Register configuration 'rimColor'
2019-11-02 19:23 Register configuration 'pipe'
2019-11-02 19:23 Register workAreaType 'SOWINGMACHINE'
2019-11-02 19:23 Register workAreaType 'CUTTER'
2019-11-02 19:23 Register workAreaType 'WINDROWER'
2019-11-02 19:23 Register configuration 'inputAttacherJoint'
2019-11-02 19:23 Register workAreaType 'TEDDER'
2019-11-02 19:23 Register workAreaType 'ROLLER'
2019-11-02 19:23 Register configuration 'cover'
2019-11-02 19:23 Register configuration 'folding'
2019-11-02 19:23 Register configuration 'fillUnit'
2019-11-02 19:23 Register configuration 'buyableBaleAmount'
2019-11-02 19:23 Register configuration 'fillVolume'
2019-11-02 19:23 data/shared/connectionHoses/hoses.i3d (36.41 ms)
2019-11-02 19:23 data/shared/connectionHoses/connectors.i3d (9.01 ms)
2019-11-02 19:23 data/shared/connectionHoses/hoseMaterialHolder.i3d (1.64 ms)
2019-11-02 19:23 data/objects/squarebales/baleStraw240.i3d (2.83 ms)
2019-11-02 19:23 data/objects/squarebales/baleHay240.i3d (1.76 ms)
2019-11-02 19:23 data/objects/squarebales/baleGrass240.i3d (1.75 ms)
2019-11-02 19:23 data/objects/squarebales/kuhnSW4014/baleSilage240.i3d (3.81 ms)
2019-11-02 19:23 data/objects/roundbales/roundbaleStraw_w112_d130.i3d (5.28 ms)
2019-11-02 19:23 data/objects/roundbales/roundbaleHay_w112_d130.i3d (5.50 ms)
2019-11-02 19:23 data/objects/roundbales/roundbaleGrass_w112_d130.i3d (2.56 ms)
2019-11-02 19:23 data/objects/roundbales/roundbaleSilage_w112_d130.i3d (0.83 ms)
2019-11-02 19:23 data/objects/cottonModules/cottonModule488.i3d (3.06 ms)
2019-11-02 19:23 data/sky/sky.i3d (1.03 ms)
2019-11-02 19:23 data/sky/rain.i3d (1.94 ms)
2019-11-02 19:23 data/maps/mapDE.i3d (2127.02 ms)
2019-11-02 19:23 data/foliage/wheat.i3d (9.21 ms)
2019-11-02 19:23 data/foliage/grassDense.i3d (2.67 ms)
2019-11-02 19:23 data/foliage/canola.i3d (5.70 ms)
2019-11-02 19:23 data/foliage/barley.i3d (3.91 ms)
2019-11-02 19:23 data/foliage/maize.i3d (10.73 ms)
2019-11-02 19:23 data/foliage/decoFoliage.i3d (32.89 ms)
2019-11-02 19:23 data/foliage/potato.i3d (6.41 ms)
2019-11-02 19:23 data/foliage/potatoHaulm.i3d (1.48 ms)
2019-11-02 19:23 data/foliage/sugarbeet.i3d (4.94 ms)
2019-11-02 19:23 data/foliage/sugarbeetHaulm.i3d (1.09 ms)
2019-11-02 19:23 data/foliage/sunflower.i3d (11.15 ms)
2019-11-02 19:23 data/foliage/soybean.i3d (6.52 ms)
2019-11-02 19:23 data/foliage/oilseedRadish.i3d (1.69 ms)
2019-11-02 19:23 data/foliage/poplar.i3d (13.01 ms)
2019-11-02 19:23 data/foliage/bush01.i3d (24.10 ms)
2019-11-02 19:23 Info: transform group 'bush01' has elements very far out from the cell edge (29.61% expansion)
2019-11-02 19:23 data/foliage/oat.i3d (9.51 ms)
2019-11-02 19:23 data/foliage/sugarCane.i3d (9.83 ms)
2019-11-02 19:23 data/foliage/sugarCaneHaulm.i3d (0.99 ms)
2019-11-02 19:23 data/foliage/cotton.i3d (7.75 ms)
2019-11-02 19:23 data/foliage/weed.i3d (8.58 ms)
2019-11-02 19:23 Enabled withering
2019-11-02 19:23 data/vehicles/train/locomotive01/locomotive01.i3d (54.19 ms)
2019-11-02 19:23 data/store/ui/shop.i3d (43.83 ms)
2019-11-02 19:23 data/shared/materialHolders/glowEffectMaterialHolder.i3d (0.96 ms)
2019-11-02 19:23 data/store/ui/cube.i3d (3.00 ms)
2019-11-02 19:23 data/store/ui/sphere.i3d (4.06 ms)
2019-11-02 19:23 data/vehicles/train/wagonGrain/wagonGrain.i3d (47.09 ms)
2019-11-02 19:23 data/vehicles/train/wagonWoodChips/wagonWoodChips.i3d (4.77 ms)
2019-11-02 19:23 data/vehicles/train/wagonTimber/wagonTimber.i3d (4.42 ms)
2019-11-02 19:23 data/vehicles/train/wagonSugarbeets/wagonSugarbeets.i3d (10.78 ms)
2019-11-02 19:23 data/vehicles/train/wagonVehicles/wagonVehicles.i3d (4.87 ms)
2019-11-02 19:23 data/placeables/limeStation/limeStation.i3d (24.70 ms)
2019-11-02 19:23 data/placeables/mapDE/sellingStationGeneric/sellingStationGeneric.i3d (4.46 ms)
2019-11-02 19:23 data/placeables/mapDE/gasStation/gasStation.i3d (0.87 ms)
2019-11-02 19:23 data/placeables/mapDE/trainStationMill/trainStationMill.i3d (2.79 ms)
2019-11-02 19:23 data/placeables/mapDE/sellingStationWood/sellingStationWood.i3d (0.73 ms)
2019-11-02 19:23 data/placeables/mapDE/railroadSilo01/railroadSilo01.i3d (1.32 ms)
2019-11-02 19:23 data/placeables/mapDE/grainElevatorEast/grainElevatorEast.i3d (1.41 ms)
2019-11-02 19:23 data/placeables/mapDE/bga/bga.i3d (4.39 ms)
2019-11-02 19:23 data/placeables/mapDE/waterFillTriggers/waterFillTriggers.i3d (0.77 ms)
2019-11-02 19:23 data/placeables/mapDE/railroadSilo02/railroadSilo02.i3d (1.27 ms)
2019-11-02 19:23 data/placeables/mapDE/sellingStationBales/sellingStationBales.i3d (1.06 ms)
2019-11-02 19:23 data/placeables/mapDE/sellingStationWoodChips/sellingStationWoodChips.i3d (2.32 ms)
2019-11-02 19:23 data/placeables/mapDE/sellingStationWool/sellingStationWool.i3d (0.66 ms)
2019-11-02 19:23 data/placeables/mapDE/trainSystem/trainSystem.i3d (4.29 ms)
2019-11-02 19:23 data/placeables/mapDE/sellingStationVehicles/sellingStationVehicles.i3d (1.00 ms)
2019-11-02 19:24 dataS2/character/humans/player/player01.i3d (324.21 ms)
2019-11-02 19:24 Setting 'Radio Volume': 0.80000001192093
2019-11-02 19:24 Setting 'Vehicle Volume': 1
2019-11-02 19:24 Setting 'Environment Volume': 1
2019-11-02 19:24 Setting 'GUI Volume': 0.89999997615814
2019-11-02 19:24 Info: Savegame Setting 'dirtInterval': 3
2019-11-02 19:24 Info: Savegame Setting 'plantGrowthRate': 3
2019-11-02 19:24 Info: Savegame Setting 'fuelUsageLow': false
2019-11-02 19:24 Info: Savegame Setting 'plowingRequiredEnabled': true
2019-11-02 19:24 Info: Savegame Setting 'weedsEnabled': true
2019-11-02 19:24 Info: Savegame Setting 'limeRequired': true
2019-11-02 19:24 dataS2/character/humans/player/player02.i3d (239.82 ms)
2019-11-02 19:24 67.883150
2019-11-02 19:24 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:24 dataS/scripts/gui/base/GuiUtils.lua(38) : attempt to perform arithmetic on local 'value' (a nil value)
2019-11-02 19:24 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:24 C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompany/gui/elements/IngameMap.lua:154: attempt to perform arithmetic on field 'lastPxPosX' (a nil value)
2019-11-02 19:24 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:24 C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompany/gui/elements/IngameMap.lua:154: attempt to perform arithmetic on field 'lastPxPosX' (a nil value)
2019-11-02 19:29 Application exit request forced.
2019-11-02 19:29 Application exit request forced.
Wie man sieht, er berechnet 67,88... als Wert und printet es aus. Danach meckert er, dass die Variable nil ist. Wenn das so wäre, kann er natürlich nicht auf den Wert kommen!
In dieser Log kommt von den GuiUtils noch ein Fehler. Das kommt, wenn die Zeile 163 nicht auskommentiert ist.

Mit dem obigen Bild (mit auskommentierte Zeile) entsteht folgende Log:
GIANTS Engine Runtime 8.0.0 (20335) 64bit (Build Date: Oct 2 2019)
Copyright (c) 2008-2019, GIANTS Software GmbH (giants-software.com), All Rights Reserved.
Copyright (c) 2003-2019, Christian Ammann and Stefan Geiger, All Rights Reserved.
Application: FarmingSimulator2019
Main System
CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 16267 MB
OS: Windows NT 10.0 64-bit
Physics System
Version: 5.9.5
Thread(s): 2
Input System
Keyboard enabled
Mouse enabled
Gamepad/Joystick enabled
Force Feedback disabled
Devices:
XINPUT_GAMEPAD
Number of Axes: 6
Number of Buttons: 14
Audio System
Driver: SoftMixer WASAPI Stereo
Version: 2018.11
Frequency: 48000
Max. active sources: 256
Render System
Driver: Direct 3D 11
Card Vendor: NVIDIA Corporation
Renderer: NVIDIA GeForce GTX 1050
Version: 26.21.14.3160 (17.7.2019)
Revision: 161
Feature level: DirectX 11
Windowed Mode : off
V-Sync : on
Effective Window Resolution: 1920 x 1080
Started 3 threads for threadpool 'Render threadpool'
Hardware Profile
Level: Custom Very High
View Distance Factor: 2.000000
Shadow Quality: 2.000000 Base-Size: 2048 Filter-Size: 16 Shadow Focus Box true
Shader Quality: 3
Skip Mipmaps: 0
LOD Distance Factor: 2.000000
Terrain LOD Distance Factor: 2.000000
Terrain Normal Mapping: Yes
Foliage View Distance Factor: 2.000000
Volume Mesh Tessellation Factor: 0.500000
Tyre Tracks Segments Factor: 4.000000
Max. Number of Shadow Lights: 8
Max. Number of Lights: 512
Max. Number of Lights Per Cluster: 32
MSAA: 1
Bloom Quality: 5
SSAO Quality: 15
DOF: Enabled
Cloud Quality: 4
EnvMap Blending: Enabled
Setting 'Master Volume': 0.10000000149012
Setting 'Is Train Tabbable': false
Setting 'Radio Vehicle Only': false
Setting 'Radio Active': false
Setting 'Use Colorblind Mode': false
Setting 'Easy Arm Control': true
Setting 'Show Trigger Marker': true
Setting 'Show Field-Info': true
Setting 'Invert Y-Look': false
Setting 'Show Help Icons': true
Setting 'Radio Volume': 0.80000001192093
Setting 'Vehicle Volume': 1
Setting 'Environment Volume': 1
Setting 'GUI Volume': 0.89999997615814
Setting 'Master Volume': 0.10000000149012
Setting 'Music Volume': 0.69999998807907
Farming Simulator 19
Version: 1.5.1.0 b6730
Available Languages: en de jp pl cz fr es ru it pt hu nl cs ct br tr ro kr
Language: de
Time: 2019-11-02 19:30:14
Cheats: Enabled
Load dlc: pdlc_claasPack (Version: 1.1.0.0) (Hash: 5e04ad19d7453580219d06e16101c079)
Load mod: FS19_EasyDevControls (Version: 1.0.0.0) (Hash: 226943e73eee43672d959ff830d4f6f6)
Load mod: FS19_GlobalCompany (Version: 1.1.2.2)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompany to use it in multiplayer.
dataS2/character/humans/characterAnimation.i3d (73.94 ms)
Load mod: FS19_GlobalCompanyAddOn_Bank (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_Bank to use it in multiplayer.
Load mod: FS19_GlobalCompanyAddOn_FieldLease (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_FieldLease to use it in multiplayer.
Load mod: FS19_GlobalCompanyAddOn_GreenSeeker (Version: 1.0.0.0)
dataS2/character/humans/pedestrians/pedestrianAnimation.i3d (32.43 ms)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_GreenSeeker to use it in multiplayer.
Load mod: FS19_GlobalCompanyAddOn_Icons (Version: 1.0.1.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_Icons to use it in multiplayer.
Load mod: FS19_GlobalCompanyAddOn_OrganicSoilManagement (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_OrganicSoilManagement to use it in multiplayer.
Load mod: FS19_GlobalCompanyAddOn_TreeMarker (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyAddOn_TreeMarker to use it in multiplayer.
Load mod: FS19_GlobalCompanyPlaceable_BGA_GrimmeBeetBeater (Version: 1.0.1.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyPlaceable_BGA_GrimmeBeetBeater to use it in multiplayer.
Load mod: FS19_GlobalCompanyPlaceable_DynamicStorageHall (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyPlaceable_DynamicStorageHall to use it in multiplayer.
Load mod: FS19_GlobalCompanyPlaceable_FermentingSilo (Version: 1.0.1.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyPlaceable_FermentingSilo to use it in multiplayer.
Load mod: FS19_GlobalCompanyPlaceable_PlaceableDisplay (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyPlaceable_PlaceableDisplay to use it in multiplayer.
Load mod: FS19_GlobalCompanyPlaceable_SeedMaker (Version: 1.0.1.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_GlobalCompanyPlaceable_SeedMaker to use it in multiplayer.
Load mod: FS19_Irgendwo_in_Thueringen_2 (Version: 2.0.0.0) (Hash: 103b47d860e0294594d5dc4097877b86)
Load mod: FS19_RM_Seasons (Version: 1.0.0.0)
Warning: Only zip mods are supported in multiplayer. You need to zip the mod FS19_RM_Seasons to use it in multiplayer.
Error: Failed to open xml file 'C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS21_Stappenbach/modDesc.xml'.
Load mod: FS21_Stappenbach
Error: Missing descVersion attribute in mod FS21_Stappenbach
2019-11-02 19:30 Error: Can't load resource 'C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompanyAddOn_FieldLease/globalCompanyAddOn_Bank.dds'.
2019-11-02 19:30 Loaded specializations
2019-11-02 19:30 Loaded vehicle types
2019-11-02 19:30 Loaded placeable types
2019-11-02 19:30 Loaded Easy Development Controls
2019-11-02 19:30 [LSMC - GlobalCompany] - [GlobalCompany > GC_languageManager]
2019-11-02 19:30 DEVELOPMENT: Standard language XML file has been loaded successfully.
2019-11-02 19:30 [LSMC - GlobalCompany] - Loading Developer-Version: 1.1.2.2 (01.11.2019)
2019-11-02 19:30 [LSMC - GlobalCompany] - [GlobalCompany > GC_languageManager]
2019-11-02 19:30 INFORMATION: '1' mod language XML files have been loaded successfully.
2019-11-02 19:30 Register configuration 'baseColor'
2019-11-02 19:30 Register configuration 'design'
2019-11-02 19:30 Register configuration 'designColor'
2019-11-02 19:30 Register configuration 'vehicleType'
2019-11-02 19:30 Register workAreaType 'RIDGEMARKER'
2019-11-02 19:30 Register configuration 'attacherJoint'
2019-11-02 19:30 Register workAreaType 'WEEDER'
2019-11-02 19:30 Register workAreaType 'PLOW'
2019-11-02 19:30 Register workAreaType 'DEFAULT'
2019-11-02 19:30 Register workAreaType 'AUXILIARY'
2019-11-02 19:30 Register configuration 'motor'
2019-11-02 19:30 Register configuration 'frontloader'
2019-11-02 19:30 Register workAreaType 'FORAGEWAGON'
2019-11-02 19:30 Register configuration 'baseMaterial'
2019-11-02 19:30 Register configuration 'designMaterial'
2019-11-02 19:30 Register configuration 'wrappingColor'
2019-11-02 19:30 Register configuration 'powerTakeOff'
2019-11-02 19:30 Register configuration 'trailer'
2019-11-02 19:30 Register workAreaType 'COMBINECHOPPER'
2019-11-02 19:30 Register workAreaType 'COMBINESWATH'
2019-11-02 19:30 Register workAreaType 'FRUITPREPARER'
2019-11-02 19:30 Register workAreaType 'BALER'
2019-11-02 19:30 Register configuration 'tensionBelts'
2019-11-02 19:30 Register workAreaType 'MOWER'
2019-11-02 19:30 Register workAreaType 'CULTIVATOR'
2019-11-02 19:30 Register workAreaType 'SPRAYER'
2019-11-02 19:30 Register configuration 'wheel'
2019-11-02 19:30 Register configuration 'rimColor'
2019-11-02 19:30 Register configuration 'pipe'
2019-11-02 19:30 Register workAreaType 'SOWINGMACHINE'
2019-11-02 19:30 Register workAreaType 'CUTTER'
2019-11-02 19:30 Register workAreaType 'WINDROWER'
2019-11-02 19:30 Register configuration 'inputAttacherJoint'
2019-11-02 19:30 Register workAreaType 'TEDDER'
2019-11-02 19:30 Register workAreaType 'ROLLER'
2019-11-02 19:30 Register configuration 'cover'
2019-11-02 19:30 Register configuration 'folding'
2019-11-02 19:30 Register configuration 'fillUnit'
2019-11-02 19:30 Register configuration 'buyableBaleAmount'
2019-11-02 19:30 Register configuration 'fillVolume'
2019-11-02 19:30 data/shared/connectionHoses/hoses.i3d (34.76 ms)
2019-11-02 19:30 data/shared/connectionHoses/connectors.i3d (10.56 ms)
2019-11-02 19:30 data/shared/connectionHoses/hoseMaterialHolder.i3d (1.83 ms)
2019-11-02 19:30 data/objects/squarebales/baleStraw240.i3d (3.23 ms)
2019-11-02 19:30 data/objects/squarebales/baleHay240.i3d (1.88 ms)
2019-11-02 19:30 data/objects/squarebales/baleGrass240.i3d (2.27 ms)
2019-11-02 19:30 data/objects/squarebales/kuhnSW4014/baleSilage240.i3d (3.12 ms)
2019-11-02 19:30 data/objects/roundbales/roundbaleStraw_w112_d130.i3d (6.44 ms)
2019-11-02 19:30 data/objects/roundbales/roundbaleHay_w112_d130.i3d (7.90 ms)
2019-11-02 19:30 data/objects/roundbales/roundbaleGrass_w112_d130.i3d (2.94 ms)
2019-11-02 19:30 data/objects/roundbales/roundbaleSilage_w112_d130.i3d (0.94 ms)
2019-11-02 19:30 data/objects/cottonModules/cottonModule488.i3d (3.02 ms)
2019-11-02 19:30 data/sky/sky.i3d (1.50 ms)
2019-11-02 19:30 data/sky/rain.i3d (5.28 ms)
2019-11-02 19:30 data/maps/mapDE.i3d (2236.05 ms)
2019-11-02 19:30 data/foliage/wheat.i3d (10.00 ms)
2019-11-02 19:30 data/foliage/grassDense.i3d (2.69 ms)
2019-11-02 19:30 data/foliage/canola.i3d (5.69 ms)
2019-11-02 19:30 data/foliage/barley.i3d (4.68 ms)
2019-11-02 19:30 data/foliage/maize.i3d (11.59 ms)
2019-11-02 19:30 data/foliage/decoFoliage.i3d (32.24 ms)
2019-11-02 19:30 data/foliage/potato.i3d (6.75 ms)
2019-11-02 19:30 data/foliage/potatoHaulm.i3d (1.48 ms)
2019-11-02 19:30 data/foliage/sugarbeet.i3d (4.21 ms)
2019-11-02 19:30 data/foliage/sugarbeetHaulm.i3d (1.02 ms)
2019-11-02 19:30 data/foliage/sunflower.i3d (10.66 ms)
2019-11-02 19:30 data/foliage/soybean.i3d (5.81 ms)
2019-11-02 19:30 data/foliage/oilseedRadish.i3d (1.81 ms)
2019-11-02 19:30 data/foliage/poplar.i3d (10.13 ms)
2019-11-02 19:30 data/foliage/bush01.i3d (19.10 ms)
2019-11-02 19:30 Info: transform group 'bush01' has elements very far out from the cell edge (29.61% expansion)
2019-11-02 19:30 data/foliage/oat.i3d (7.39 ms)
2019-11-02 19:30 data/foliage/sugarCane.i3d (10.82 ms)
2019-11-02 19:30 data/foliage/sugarCaneHaulm.i3d (0.94 ms)
2019-11-02 19:30 data/foliage/cotton.i3d (6.66 ms)
2019-11-02 19:30 data/foliage/weed.i3d (8.44 ms)
2019-11-02 19:30 Enabled withering
2019-11-02 19:30 data/vehicles/train/locomotive01/locomotive01.i3d (56.39 ms)
2019-11-02 19:30 data/store/ui/shop.i3d (47.40 ms)
2019-11-02 19:30 data/shared/materialHolders/glowEffectMaterialHolder.i3d (2.62 ms)
2019-11-02 19:30 data/store/ui/cube.i3d (3.20 ms)
2019-11-02 19:30 data/store/ui/sphere.i3d (1.43 ms)
2019-11-02 19:30 data/vehicles/train/wagonGrain/wagonGrain.i3d (45.32 ms)
2019-11-02 19:30 data/vehicles/train/wagonWoodChips/wagonWoodChips.i3d (4.81 ms)
2019-11-02 19:30 data/vehicles/train/wagonTimber/wagonTimber.i3d (4.65 ms)
2019-11-02 19:30 data/vehicles/train/wagonSugarbeets/wagonSugarbeets.i3d (11.51 ms)
2019-11-02 19:30 data/vehicles/train/wagonVehicles/wagonVehicles.i3d (3.90 ms)
2019-11-02 19:30 data/placeables/limeStation/limeStation.i3d (13.61 ms)
2019-11-02 19:30 data/placeables/mapDE/sellingStationGeneric/sellingStationGeneric.i3d (4.35 ms)
2019-11-02 19:30 data/placeables/mapDE/gasStation/gasStation.i3d (0.66 ms)
2019-11-02 19:30 data/placeables/mapDE/trainStationMill/trainStationMill.i3d (2.35 ms)
2019-11-02 19:30 data/placeables/mapDE/sellingStationWood/sellingStationWood.i3d (0.69 ms)
2019-11-02 19:30 data/placeables/mapDE/railroadSilo01/railroadSilo01.i3d (1.28 ms)
2019-11-02 19:30 data/placeables/mapDE/grainElevatorEast/grainElevatorEast.i3d (1.09 ms)
2019-11-02 19:30 data/placeables/mapDE/bga/bga.i3d (3.52 ms)
2019-11-02 19:30 data/placeables/mapDE/waterFillTriggers/waterFillTriggers.i3d (0.71 ms)
2019-11-02 19:30 data/placeables/mapDE/railroadSilo02/railroadSilo02.i3d (1.40 ms)
2019-11-02 19:30 data/placeables/mapDE/sellingStationBales/sellingStationBales.i3d (0.72 ms)
2019-11-02 19:30 data/placeables/mapDE/sellingStationWoodChips/sellingStationWoodChips.i3d (2.27 ms)
2019-11-02 19:30 data/placeables/mapDE/sellingStationWool/sellingStationWool.i3d (0.69 ms)
2019-11-02 19:30 data/placeables/mapDE/trainSystem/trainSystem.i3d (5.10 ms)
2019-11-02 19:30 data/placeables/mapDE/sellingStationVehicles/sellingStationVehicles.i3d (0.83 ms)
2019-11-02 19:30 dataS2/character/humans/player/player01.i3d (323.71 ms)
2019-11-02 19:30 Setting 'Radio Volume': 0.80000001192093
2019-11-02 19:30 Setting 'Vehicle Volume': 1
2019-11-02 19:30 Setting 'Environment Volume': 1
2019-11-02 19:30 Setting 'GUI Volume': 0.89999997615814
2019-11-02 19:30 Info: Savegame Setting 'dirtInterval': 3
2019-11-02 19:30 Info: Savegame Setting 'plantGrowthRate': 3
2019-11-02 19:30 Info: Savegame Setting 'fuelUsageLow': false
2019-11-02 19:30 Info: Savegame Setting 'plowingRequiredEnabled': true
2019-11-02 19:30 Info: Savegame Setting 'weedsEnabled': true
2019-11-02 19:30 Info: Savegame Setting 'limeRequired': true
2019-11-02 19:30 dataS2/character/humans/player/player02.i3d (240.79 ms)
2019-11-02 19:30 87.730334
2019-11-02 19:30 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:30 C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompany/gui/elements/IngameMap.lua:154: attempt to perform arithmetic on field 'lastPxPosX' (a nil value)
2019-11-02 19:31 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:31 C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompany/gui/elements/IngameMap.lua:154: attempt to perform arithmetic on field 'lastPxPosX' (a nil value)
2019-11-02 19:31 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:31 C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompany/gui/elements/IngameMap.lua:154: attempt to perform arithmetic on field 'lastPxPosX' (a nil value)
2019-11-02 19:31 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:31 C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompany/gui/elements/IngameMap.lua:154: attempt to perform arithmetic on field 'lastPxPosX' (a nil value)
2019-11-02 19:31 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:31 C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompany/gui/elements/IngameMap.lua:154: attempt to perform arithmetic on field 'lastPxPosX' (a nil value)
2019-11-02 19:31 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:31 C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompany/gui/elements/IngameMap.lua:154: attempt to perform arithmetic on field 'lastPxPosX' (a nil value)
2019-11-02 19:31 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:31 C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompany/gui/elements/IngameMap.lua:154: attempt to perform arithmetic on field 'lastPxPosX' (a nil value)
2019-11-02 19:31 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:31 C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompany/gui/elements/IngameMap.lua:154: attempt to perform arithmetic on field 'lastPxPosX' (a nil value)
2019-11-02 19:31 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:31 C:/Users/kevin/Documents/My Games/FarmingSimulator2019/mods/FS19_GlobalCompany/gui/elements/IngameMap.lua:154: attempt to perform arithmetic on field 'lastPxPosX' (a nil value)
2019-11-02 19:42 Application exit request forced.
2019-11-02 19:42 Application exit request forced.
Der Wert ist hier anders, das kommt auf die aktuelle Mausposition an.

Was mir auch auffällt bei den beiden Logs... Warum kommt der Fehler in den GuiUtils zuerst, obwohl er zuerst eigentlich das nil bringen müsste?

Wie man sowas reproduzieren kann... keine Ahnung. Der Fall kommt auch nicht all zu oft vor.

Ich hoffe, der Fehler kann gefunden werden!

Bei Rückfragen steh ich natürlich zu Verfügung.
Meine Mods: LS-Modcompany - Mods

Facebook: LS-Modcompany
Website: LS-Modcompany

User avatar
Decker_MMIV
Posts: 257
Joined: Wed Aug 22, 2012 1:02 am

Re: Fehler im Lua-System

Post by Decker_MMIV » Sun Nov 03, 2019 9:32 am

kevink98 wrote:
Sat Nov 02, 2019 7:49 pm
2019-11-02 19:24 Error: Running LUA method 'mouseEvent'.
2019-11-02 19:24 dataS/scripts/gui/base/GuiUtils.lua(38) : attempt to perform arithmetic on local 'value' (a nil value)
Sorry, this is going to be in English. I hope you can understand it anyway.

Line 38 in GuiUtils.lua contains (if we assume that game patch 1.5.1.0 hasn't changed this, compared to the 1.3.1.0 scripts that is published in GDN):

Code: Select all

  value = value / refSize[((k + 1) % 2) + 1]
So somehow the 'value' variable, have been assigned 'nil' just before this line 38.

But how did it get there?
From your screenshots (do please use [code] [/code] tags, instead of screenshots), it looks like that self.overlayElement:setUV is presumably calling the GC_Gui_overlay:setUV method, which (I assume) contains this:

Code: Select all

function GC_Gui_overlay:setUV(str)
	self.uvs = GuiUtils.getUVs(str, self.imageSize, nil);
end;
Looking at the GuiUtils.getUVs method in GDN, we see that it calls GuiUtils.getNormalizedValues, so that explains how we got there.

Looking at the whole code of that GuiUtils.getNormalizedValues method, there are three places where 'value' variable is assigned, before line 38:

Code: Select all

local value = part

value = string.gsub(value, "px", "")   -- when text "px" is found in 'value'

value = Utils.evaluateFormula(value)
In case 'value' was already 'nil' when executing the string.gsub method, then that would have failed with an error, but then it would have been a different source-code line that should be logged. - So lets assume that 'value' is not 'nil' at this point.

So what does that Utils.evaluateFormula method even do? Could it perhaps return a 'nil' value, depending on what input we give it? - Unfortunately it seems to not be documented on GDN, as searching Google with 'site:'-option only finds two hits, neither of which gives any clues.

Since its a bit difficult to debug into the non-public scrips, I guess its time to go back, to just before calling the base game's scripts.

May I suggest that you change the code in that GC_Gui_ingameMap:zoom, so you print out what is actually being sent to self.overlayElement:setUV:

Code: Select all

local tmpUVs = string.format("%spx %spx %spx %spx", self.lastPxPosX, self.lastPxPosY, self.lastSize, self.lastSize)

print("tmpUVs=", tmpUVs)  -- Log the single argument-value we're actually going to call setUV() with.

self.overlayElement:setUV(tmpUVs)

Post Reply