Replies: 1 comment 4 replies
-
This should do the trick: --- Returns true if the specified navigation parameters results in a navigatable path.
---@param x number
---@param y number
---@param z number
---@return fun(): boolean
function Navigation.PathExists(x, y, z) end
local exists = Navigation.PathExists(10, 20, 30)() |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the game system I'm writing for, values returned from a function actually require an extra set of parenthesis to get the "real" return value. The call returns userdata and having Lua evaluate that data into something usable is what the extra parens force. As an example, let's say there's a
Navigation
namespace with a functionPathExists(x, y, z)
. Making a call likewill only work if I have an extra set of parens on the call (i.e.,
PathExists(10, 20, 5)()
).The method is currently annotated as
Is there a way to modify this annotation to have the language server prompt me for the extra?
Beta Was this translation helpful? Give feedback.
All reactions