GetAheadLocation - Example?

Can anyone please help in writing an example for the function GetAheadLocation? We could also then add it to NWN Lexicon
https://nwnlexicon.com/index.php?title=GetAheadLocation
I'm getting errors trying to copy paste and playing around with it
https://nwnlexicon.com/index.php?title=GetAheadLocation
I'm getting errors trying to copy paste and playing around with it
0
Comments
Like so:
#include "x0_i0_position" void main() { }
void main()
{
object oPC = GetLastUsedBy();
location lTarget = GetAheadLocation(oPC);
AssignCommand(oPC, JumpToLocation(lTarget));
}
I did indeed forget to include the #include "x0_i0_position"
I'll add it to NWN Lexicon later on
Thank you