stijnwop / guidanceSteering

Guidance Steering (AutoTrack) for Farming Simulator 22.
381 stars 94 forks source link

[BUG FS22] lua:1007 Error when trying to Realign track when no angle or A+B line are set #257

Closed Lactic68 closed 2 years ago

Lactic68 commented 2 years ago

Describe the bug When trying to realign track (using ALT + END) and there is no angle set or A+B line, this will pop a LUA error. 2021-12-10 18:26 Error: Running LUA method 'update'. 2021-12-10 18:26 C:/Users/lacti/Documents/My Games/FarmingSimulator2022/mods_server/FS22_guidanceSteering/src/vehicles/GlobalPositioningSystem.lua:1007: attempt to call method 'setWarningMessage' (a nil value)

To Reproduce Steps to reproduce the behavior:

  1. Activate GPS with ALT+C
  2. Type ALT+End to realign track
  3. Go to the log
  4. See error

Expected behavior No error in the log and maybe a warning message saying that there is no route set.

Desktop (please complete the following information):

stijnwop commented 2 years ago

Pushed a fix, please verify. :)

Lactic68 commented 2 years ago

Yep, bug is fixed, thank you.