1. I'm trying to call another plugin's method. I'm getting the error in my plugin: "the name FUNCTION does not exist in the current context." where FUNCTION is the name of the function in the plugin reference.

    I do have [PluginReference] Plugin PLUGIN_NAME; in my class.

    Any suggestions?
     
  2. Wulf

    Wulf Community Admin

    Could you show an example of what you are trying to call and how?

    With that setup, you'd call it by using something like:
    Code:
    PLUGIN_NAME.Call("MethodName", "args");
     
  3. Okay here's exactly what I'm trying to do. I want to be able to get a players XY position on the map such as A1, B2, C3, etc, not just their Vector position. I found a function in GrTeleport that will do this. The function in that plugin is:

    string GetGridReference(Vector3 position)

    So I put [PluginReference] Plugin GrTeleport; inside my class

    And in one of my functions I try to call:

    string playerPosition = GrTeleport.Call(GetGridReference, hitInfo.HitPositionWorld);

    GetGridReference has the error.
     
  4. Code:
    string playerPosition = GrTeleport.Call("GetGridReference", hitInfo.HitPositionWorld);
     
  5. Duh... thank you!

    Unfortunately hitInfo.HitPositionWorld is returning the same vector regardless of where it happens on the map. :(
    [DOUBLEPOST=1523387333][/DOUBLEPOST]Actually it's returning 0,0,0