Hey,
i get a ObjectReferenceExcpetion on my hook:
How to get the item name?
The exception comes from "string name = i.info.shortname;"
Code:void OnExplosiveThrown(BasePlayer player, BaseEntity entity) { if (entity == null) { rust.BroadcastChat("", "no item"); } else { Item i = entity.GetItem(); string name = i.info.shortname; } }
NullReferenceExcepton getting item name in OnExplosiveThrown
Discussion in 'Rust Development' started by Sir BenSon, Aug 30, 2016.
