Jump to content

targetid

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by targetid

  1. I tried it... casting to Nethandle give me the same error.
  2. Hallo zusammen, ich habe heute mein Projekt (Serverside C#) auf die Version "1.1.0.0" aktualisiert. Nun habe ich folgendes Problem, dass seitdem Update auf die neue Version kein einziges NetHandle (TextLabel,ColShape,Marker) erstellt werden kann, weil intern in der Bootstrap.dll eine Exception auftritt. Beispielsweise bei dieser Codezeile kriege ich immer die unten gezeigte Exception: NAPI.ColShape.Create2DColShape(0, 0, 100, 100, 0); Exception: https://ibb.co/YRxDBfR System.ArgumentException: "Object of type 'GTANetworkAPI.ColShape' cannot be converted to type 'GTANetworkAPI.NetHandle'." Release Thread: Daten zum C# Projekt: NetCore-Version: 3.1.0 Bootstrap.dll-Version: 1.1.0.0 System.Private.CoreLib.dll (Version: 4.700.19.60701) eingebundene externe Libraries: MySQL.Data.dll (Version: 8.0.20) Newtonsoft.Json.dll (Version: 12.0.3)
      • 1
      • Sad
  3. https://imgur.com/LcnDkSw
  4. and how it is in relation to my problem? My Problem is when i execute the NAPI.Marker.CreateMarker Function that it cannot convert to another data type, and this exeception comes already ... when i execute the function without filling the function response to var or not, only the execution give me the top described exception.
  5. Picture doesnt exit ...
  6. Hello guys, i updated my project (serverside C#) with the actual gtanetwork.api 1.1.0-DP1 from git, it work fine, but when i want to create a marker or some other nethandle/entity i got an exception that: "Object of type 'GTANetworkAPI.Marker' cannot be converted to type 'GTANetworkAPI.NetHandle'." And this happend by execute following line (marked with comment/arrow): public static GTANetworkAPI.Marker CreateMarker(GTANetworkAPI.MarkerType markerType, Vector3 pos, Vector3 dir, Vector3 rot, float scale, Color color, bool bobUpAndDown = false, uint dimension = 0) { GTANetworkAPI.Marker markerID = NAPI.Marker.CreateMarker(markerType, pos, dir, rot, scale, color, bobUpAndDown, dimension);// <<---------------- THIS LINE MarkerObject markerObject = new MarkerObject { MarkerType = markerType, MarkerPos = pos, MarkerDir = dir, MarkerRot = rot, MarkerScale = scale, MarkerColor = new Color(color.Red,color.Green,color.Blue), MarkerBoopAndDown = bobUpAndDown, MarkerDimension = dimension }; _markerProperties.Add(markerID, markerObject); return markerID; } The Bug is that the NAPI Class implements static variable definitions to GTANetworkMethods.Marker but in the GTANetworkMethods.Marker class is the Function CreateMarker that respond me the Marker handle from created marker, but through the NAPI class it cannot convert to GTANetworkAPI.Marker. public static class NAPI { public static readonly uint GlobalDimension; public static readonly int MainThreadId; public static World World; public static GTANetworkMethods.Vehicle Vehicle; public static Util Util; public static GTANetworkMethods.DummyEntity DummyEntity; public static GTANetworkMethods.TextLabel TextLabel; public static Server Server; public static Resource Resource; public static Pools Pools; public static GTANetworkMethods.Player Player; public static GTANetworkMethods.Pickup Pickup; public static GTANetworkMethods.Ped Ped; public static Particle Particle; public static GTANetworkMethods.Object Object; public static Notification Notification; public static Native Native; public static GTANetworkMethods.Marker Marker;// <<-------------------------------------- public static Explosion Explosion; public static GTANetworkMethods.Entity Entity; public static Data Data; public static GTANetworkMethods.ColShape ColShape; public static Command Command; public static ClientEventThreadSafe ClientEventThreadSafe; public static LocalEvent LocalEvent; public static ClientEvent ClientEvent; public static GTANetworkMethods.Checkpoint Checkpoint; public static Chat Chat; public static GTANetworkMethods.Blip Blip; public static ACL ACL; public static Task Task; public static Log Log; [Dynamic] public static dynamic Exported { get; } } So, the question is, how i can fix it? I tried to call the CreateMarker Function directly in GTANetworkMethods.Marker class but i got the same error...
×
×
  • Create New...