Pointer to function?

Pretty new to Lua, so maybe this is a simple Lua question, but I’ve tried to search and read Lua tutorials and can’t find out how to pass a pointer to a function, so the function can change the variable.

What I’m trying to figure out is how to use GetRandomVehicleNode, which is define like this in C# code:

bool Native.GetRandomVehicleNode(float x, float y, float z, float radius, bool p4, bool p5, bool p6, Vector3* outposition, float* heading)

How to I get outposition and heading to get passed back?

They’re returned. They should be returned in the order they appear in the definition and after any initial return value.

For example

void SomeMethod(int* i) // local i = SomeMethod()

Should just return an integer. However,

bool SomeMethod(int* i) // local b,i = SomeMethod

Should return a boolean then an integer

@Havoc Oh, thank you! I tried outpos, heading = GetRandomVehicleNode(..), but couldn’t figure out why outpos was 1/true and thought I was way off in my experimentation. That makes sense, thanks.