These are chat archives for ikkentim/SampSharp

11th
Oct 2016
Florian van Dillen
@fvandillen
Oct 11 2016 15:36
The crash was caused by calling vehicle.SetNumberPlate with a value that's null. Doesn't give any errors, just completely crashes the entire thing.
Tim Potze
@ikkentim
Oct 11 2016 19:36
hmm probably forgot a null ref test, causing null to be sent to the native, which samp doesn't like
Tim Potze
@ikkentim
Oct 11 2016 20:25
Fixed it for this specific case, need something better later, created #166
Xalphox
@Xalphox
Oct 11 2016 22:44
Any idea why exceptions thrown in the Clicked event on Textdraws track back to ExceptionDispatchInfo.Throw
rather than the actual method?
I thought maybe there was a catch (Exception ex) throw ex; as opposed to a rethrow but I can't see anything - puzzling the heck out of me, as it won't roll up to my try {} catch {} in my OnPlayerClickPlayerTextDraw event
Xalphox
@Xalphox
Oct 11 2016 23:24

Also, is there a reason your [Command] stuff doesn't work in static classes @ikkentim?

ex:

This works:

    public class MoreCommands
    {
        [Command("more")]
        public static void Command(Player player)
        {
            Messaging.Message value = player.GetMore();
            if (value != null)
            {
                player.SendClientMessage(value.Color, value.Content);
                player.ClearMore();
            }
        }
    }

This doesn't:

    public static class MoreCommands
    {
        [Command("more")]
        public static void Command(Player player)
        {
            Messaging.Message value = player.GetMore();
            if (value != null)
            {
                player.SendClientMessage(value.Color, value.Content);
                player.ClearMore();
            }
        }
    }