ZZ-Cat / raildriver

Smart Locomotive Controller script for Garry's Mod Train Build Servers.
GNU Affero General Public License v3.0
2 stars 0 forks source link

Compiler warnings #64

Closed ZZ-Cat closed 1 year ago

ZZ-Cat commented 1 year ago

Describe the bug There are various compiler warnings throughout some of RailDriver's files.

To Reproduce Steps to reproduce the behavior:

  1. Open up the Expression2 Editor
  2. Pick any one of RailDriver.txt, local.txt, remote.txt, or cli.txt
  3. See error

Expected behavior Compiler should not be showing any warnings, whatsoever.

Screenshots 20230529140429_1 Compiler warnings from RailDriver.txt

20230529140459_1 Compiler warnings in RailDriver/lib/ota/local.txt

20230529140516_1 Compiler warning in RailDriver/lib/ota/remote.txt

20230529140544_1 Compiler warnings in RailDriver/lib/cli.txt

Additional context Expression2's API was re-factored & had deprecated all of the old clk() functions in favour of newer event handlers.

ZZ-Cat commented 1 year ago

A lot of these compiler warnings are referencing use of deprecated function: [insert outdated 'clk()' function here]: 'use [insert replacement Event Handler equivalent here] instead.'

I may need to tackle this issue in two stages:

  1. Do all of the trivial stuff first (EG unused variable & return value of this function cannot be discarded).
  2. Refactor RailDriver to use Event Handlers.

That last one is more involved, because RailDriver makes extensive use of the old clock functions, & the majority of the code is built around that. So, the refactor would pretty much be a total rewrite of RailDriver, in order to adapt it to the new Event Handler API.

I will see how I go. =^/.~=

github-actions[bot] commented 1 year ago

This issue has been closed due to inactivity in over 30 days after being marked for closure.