View Single Post
01-04-19, 12:47 PM   #5
FranekW
A Cyclonian
 
FranekW's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 44
I know what I did, now. There is no typo in the block of code (the first one), which I tested again.

UnitInVehicle() inside the event handler UNIT_EXITED_VEHICLE would never return "true" because, when this event is fired, a player is no longer in a vehicle, which I could not understand. Before, I tried to test the whole handler by adding `print(UnitInVehicle("player"))` in front of `if` and this is where I must have made a typo.

I was confused and assumed that perhaps UnitInVehicle() is not available (as I got nil before). It's total newbie thing! I hope someone else can learn from my mistake!
  Reply With Quote