blt950 0 Posted November 29, 2018 (edited) Hey, I'm trying to play around a bit with the C# development of RageMP to get to know it, however I got stuck in something I think it's either me doing something wrong, or possibly bug. I suppose the first, as no one else seems to cover this problem I've. I've this very simple script so far, running on NetCore 2.0, RageMP at latest stable version, but yet my server crash each time I leave a vehicle, even though I don't have any events hooked into that. However what I found very peculiar is that if I remove/comment out the OnPlayerEnterVehicle function, the crashes are gone! I've tried to debug this in VS2017 but it says this runtime error comes from external source, so it can't point at anything specific in my script. Any suggestions of what this could be? Suggestions on how to debug it further is also appreciated The runtime error Quote ==================[29.11.2018 22:32:48]================== System.Reflection.TargetParameterCountException: Parameter count mismatch. at object[] System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture) ========================================================= The project using System; using GTANetworkAPI; namespace MyCustomResource { public class Main : Script { [ServerEvent(Event.ResourceStart)] //This type of event is mainly used for handling stuff after this resource has been initiated. public void ResourceStart() { Console.WriteLine("\n--------------------------------------"); Console.WriteLine("Blank Script by your name here v2"); Console.WriteLine("--------------------------------------\n"); } [Command("hi", Alias = "hello, hey, howdy")] public void SayHi(Client player) { NAPI.Chat.SendChatMessageToPlayer(player, "Hello!"); } [Command("car")] public void CmdCreateCar(Client client) { NAPI.Vehicle.CreateVehicle(VehicleHash.Adder, client.Position.Around(5), 0f, 0, 0, "Test"); //Spawned vehicle is visible in all Dimensions } [ServerEvent(Event.PlayerEnterVehicle)] public void OnPlayerEnterVehicle(Client player, Vehicle vehicle, sbyte seatID) { Console.WriteLine("TEst"); } } } Edited November 30, 2018 by blt950 Share this post Link to post Share on other sites
ragempdev 792 Posted November 30, 2018 Reference bootstrapper.dll instead of NuGet package. 1 Share this post Link to post Share on other sites
blt950 0 Posted November 30, 2018 Thanks! That did the trick! Share this post Link to post Share on other sites
_Lacker_ 0 Posted December 16, 2018 Hey, I think that I have almost the same problem but my server crashes when I am entering a vehicle and not because of leaving one. Maybe this would help me : Am 30.11.2018 um 13:13 schrieb ragempdev: Reference bootstrapper.dll instead of NuGet package. But I don´t know how to do this. If someone has a Suggestion, please reply. Share this post Link to post Share on other sites
iqtak 0 Posted February 14 On 11/30/2018 at 4:13 AM, ragempdev said: Reference bootstrapper.dll instead of NuGet package. Hello , we cant know you what say i find bootstrapper.dll but now what ? "instead of NuGet package" ?????? When in server Entering a Vehicle or Player Dead = Server Crash !!!!!!!!!!! ==================[2/14/2019 1:04:32 PM]================== System.Reflection.TargetParameterCountException: Parameter count mismatch. at object[] System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture) ========================================================= Please Get link , image , code or........... Help ! Share this post Link to post Share on other sites
Smile325 0 Posted 20 hours ago Am 30.11.2018 um 16:41 schrieb blt950: Thanks! That did the trick! Can u explain what exactly you did? Share this post Link to post Share on other sites