Autodrive

by Pi-C

Car equipment for train avoidance, logistic network integration, circuit network connectivity, fuel refill, ammo reload, vehicle repair, radio control, enemy targeting, and gate control.

Content
2 months ago
0.17 - 1.1
2.98K
Transportation Combat Logistic network Circuit network

b [Fixed] crash with vehicle wagon mod

2 years ago

The mod Vehicle Wagon 2 (3.1.21) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event VehicleWagon2::on_tick (ID 0)
Error when running interface function autodrive.vehicle_removed: autodrive/control.lua:324: attempt to index local 'owner' (a number value)
stack traceback:
autodrive/control.lua:324: in function 'reset_color'
autodrive/control.lua:819: in function 'gui_car_unpublish'
autodrive/control.lua:3255: in function <autodrive/control.lua:3244>
stack traceback:
[C]: in function 'call'
VehicleWagon2/script/loadVehicleWagon.lua:111: in function 'loadVehicleWagon'
VehicleWagon2/control.lua:141: in function <VehicleWagon2/control.lua:94>

2 years ago

Hey Pi-C, I know we had this working before see here. Does your code still have the interface functions "get_vehicle_data" and "vehicle_removed"?

And it doesn't seem to register script_raused_destroy, which will cause a lot of problems with other mods too.

2 years ago

Thanks for the report! I'm not at home right now, but will look at it later today.

@robot256:

Does your code still have the interface functions "get_vehicle_data" and "vehicle_removed"?

It should.

And it doesn't seem to register script_raused_destroy, which will cause a lot of problems with other mods too.

Did you grep for "script_RAUSED_destroy", or was that just a typo in your post? I don't remember removing the handler for script_RAISED_destroy, but of course there is a chance that I did do something wrong.

By the way, I've been resuming work on GCKI and there are two things I'll need for compatibility with Vehicle Wagons. If you don't mind, I'll send you my WIP version of GCKI and perhaps even a patch for Vehicle Wagons in the next few days. :-)

2 years ago

Hehe yes my code runs without error. Also note that I add a nonstandard parameter that might be useful. See this line

I didn't see scrip_raised_destroy or the interfaces in control.lua on your gitlab's main branch so that's why I asked. Sure on the future changes, stay in touch.

2 years ago

Hehe yes my code runs without error. Also note that I add a nonstandard parameter that might be useful. See this line

Oh, vehicle_loaded/vehicle_unloaded is new? I've noticed these values today when I was testing for the new GCKI version.

I didn't see scrip_raised_destroy or the interfaces in control.lua on your gitlab's main branch so that's why I asked.

Ooops. That's still from dorfl! He was the original author of Autodrive, and transferred the mod to me when he quit Factorio. I don't use gitlab or similar, so what you see there is not what you'll get when you download the mod here! :-D

2 years ago

Should be fixed in version 1.1.1. The variable "owner" referred to LuaPlayer.index (a number) rather than LuaPlayer (a table), so reading a table value from it would crash the game.

2 years ago

works now, tnx :)

New response