Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Compilation Error

Featured Replies

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;
        }
    }

 

 

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.

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.

  • Author

Ok, i think i got it now. Thanks :)

 

It was template by Droidz in here 

 

Maybe hes template needs also fixing :)

 

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;
  • 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 :/

b300ff7ea5.png

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.