Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

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.

'None-invocable member 'Entity.Heading' cannot be used like a method.'

Featured Replies

I'm trying to get into code with c# but already I have hit a bump. I managed to get the whole way through the code then when coming to test it there was a lot of errors and warnings. Most I managed to fix but most I couldn't find the rest of them so I decided to start again doing it the same way I had done last time but only testing the code as I go along instead of at the finish. 

 

This time it gave me an error saying 'None-invocable member 'Entity.Heading' cannot be used like a method.' with a warning saying 'There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "RagePluginHookSDK, Version=0.0.0.0, Culture=neutral, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.'

 

Game.LogTrivial("Spawning Cop and cop vehicle");
                Ped RogueOfficer = new Ped("s_f_y_cop01", Game.LocalPlayer.Character.GetOffsetPositionFront(10f),Game.LocalPlayer.Character.Heading(180f));
                Vehicle RogueOfficerCar = new Vehicle("FBI", Game.LocalPlayer.Character.GetOffsetPositionFront(15f),Game.LocalPlayer.Character.Heading(180f));
                Game.LogTrivial("Spawn successful");
            });
        }
    }
} 

         

KDenv01

  • Author

I haven't done anything with the processor but the framework is set to 4.6

 

 

Edited by KDenv01

KDenv01

Game.LocalPlayer.Character.Heading(180f));

Cannot be used as a method, as the error states.

It can only Get or Set a value.

 

 

You could calculate the heading yourself  or use

public override void Face(
	Vector3 position
)

Where posistion is Game.LocalPlayer.Character

Edited by epicmrjuan

Thank you

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

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.