October 13, 20169 yr I have following compilation error : Translated the error best i could. Spoiler error CS0019: Operator > cannot be use with operand types MemoryRobot.Int128 and int Code below : internal void Rotation() { Logging.Write("[My fightclass] Is started."); while (_isLaunched) { try { if (!Products.InPause) { if (!ObjectManager.Me.IsDeadMe) { //BuffRotation(); if (Fight.InFight && ObjectManager.Me.Target > 0) { Pull(); CombatRotation(); } } } } catch (Exception e) { Logging.WriteError("[My fightclass] ERROR: " + e); } Thread.Sleep(10); // Pause 10 ms to reduce the CPU usage. } Logging.Write("[My fightclass] Is now stopped."); } Also i get compilation errors with following code (error included in the spoiler) Spoiler error CS0019 Operator == cannot be used with operand types MemoryRobot.Int128 and ulong error CS0029 Class MemoryRobot.Int128 cannot be implicidly transformed to class ulong internal void Pull() { if (ObjectManager.Me.Target == _lastTarget) return; // Stealth: if (Prowl.IsSpellUsable && !Prowl.HaveBuff && ObjectManager.Target.Target != ObjectManager.Me.Guid) { Prowl.Launch(); _lastTarget = ObjectManager.Me.Target; } }
October 13, 20169 yr 1 hour ago, fatfang said: Hide contents Code below : internal void Rotation() { Logging.Write("[My fightclass] Is started."); while (_isLaunched) { try { if (!Products.InPause) { if (!ObjectManager.Me.IsDeadMe) { //BuffRotation(); if (Fight.InFight && ObjectManager.Me.HasTarget) { Pull(); CombatRotation(); } } } } catch (Exception e) { Logging.WriteError("[My fightclass] ERROR: " + e); } Thread.Sleep(10); // Pause 10 ms to reduce the CPU usage. } Logging.Write("[My fightclass] Is now stopped."); } Try if (Fight.InFight && ObjectManager.Me.HasTarget) Hide contents error CS0019 Operator == cannot be used with operand types MemoryRobot.Int128 and ulong error CS0029 Class MemoryRobot.Int128 cannot be implicidly transformed to class ulong internal void Pull() { if (ObjectManager.Me.Target == _lastTarget?.Guid) return; // Stealth: if (Prowl.IsSpellUsable && !Prowl.HaveBuff && ObjectManager.Target.Target != ObjectManager.Me.Guid) { Prowl.Launch(); _lastTarget = ObjectManager.Me.TargetObject; } } Make sure that ur property "_lastTarget" is type of ulong and not int Hope that helped.
October 13, 20169 yr Author Just now, iMod said: Hope that helped. Only thing i have in code is "private WoWUnit _lastTarget;"
October 13, 20169 yr 10 minutes ago, fatfang said: Only thing i have in code is "private WoWUnit _lastTarget;" Oh okay that means you are holding the object of the target. If you want to validate it by ID you just need to use the Guid property. I have changed the code above just check it out. You need to take care of the type you are validating. For example: _lastTarget = ObjectManager.Me.Target; You tried to put a ulong into a WoWUnit object and that wont work.
October 13, 20169 yr Author Ok, i think i got it now. Thanks :) It was template by Droidz in here Maybe hes template needs also fixing :)
October 13, 20169 yr 4 minutes ago, fatfang said: Ok, i think i got it now. Thanks :) It was template by Droidz in here Maybe hes template needs also fixing :) He is not using the WoWUnit object ;) he is using the ulong private ulong _lastTarget;
October 13, 20169 yr Author Well it was originally full copy paste, it didnt work either with that ulong. After i did change the code while trying to fix it. Same error. Below error from direct copy paste of that template. Same error in exactly same row. It might have been working template when he created but it aint anymore :/
October 13, 20169 yr Hello, replace ObjectManager.Me.Target > 0 by ObjectManager.Me.Target.IsNotZero() and replace (if '_lastTarget' is WoWUnit): if (ObjectManager.Me.Target == _lastTarget) by if (ObjectManager.Me.Target == _lastTarget.Guid)
Create an account or sign in to comment