VehicleSnap

by Zaflis

Smoothly snaps movement angle when driving cars or tanks.

Content
20 days ago
0.13 - 2.0
240K
Transportation

b Error Message

5 years ago

I've gotten an error twice now, once when I was placing landfill, the other time when I was placing water with the Waterfill mod. I didn't save the error message from when I was placing landfill, but this message was when I was placing water.

Error while running event VehicleSnap::on_tick (ID 0)
VehicleSnap/control.lua:114: attempt to index field 'vehicle' (a nil value)
stack traceback:
VehicleSnap/control.lua:114: in function <VehicleSnap/control.lua:106>

5 years ago
(updated 5 years ago)

I need more info as i can't reproduce. I have played over 100 hours in 0.17, and thousand + landfill placed, some by bots, some by hand. I tried now by planting landfill over water as i drive right at the edge of it, and no error. Waterfill does not exist in vanilla, i could help if you listed all your mods. Did it bug while you were driving something, or a vehicle nearby? What mod is the vehicle from, and what modifies it? It should show those things printed in yellow in tooltip.

However, i can add a check at that point in code that might fix it.

5 years ago
(updated 5 years ago)

Both times it bugged while I was driving and placing the tiles. The first time I was driving a car mk2 from the Car MK2 mod, the second time I was driving the heavy tank from HeavyTank mod. They're both modified by natural evolution enemies, but I didn't have that mod installed the first time it happened.

https://imgur.com/S4GhCFd
https://imgur.com/H38qfgj
https://imgur.com/YbcBkuK

These are the mods I have installed.

5 years ago
(updated 5 years ago)

I uploaded an update, if you could test. I did a changelog overhaul alongside it, long overdue.

Basically the above error should never happen. I merely added a failsafe for if somehow driving state for player is still on when it shouldn't. It means some event (such as driving state change) was not triggered by game, and i can hardly guess what would cause it. Likely not because of this mod though.

If this error happens while you are driving, it should be turning snapping off for you until you step into vehicle again. And by that mean there won't be an error message anymore and i never had this happen in my test so... Most people still should never encounter it.

New response