JohnHeikens / IntelliSkript

Intellisense for skript!
GNU General Public License v3.0
6 stars 2 forks source link

"Cannot recognize function" if function has a return #121

Open Yahiamice opened 1 month ago

Yahiamice commented 1 month ago

I've got plenty of functions in my skript code, but those that return a value are considered errors by intelliskript?

function find2BlockGap(xcoord: number,zcoord: number):: location: loop all blocks between location({_xcoord},320,{_zcoord}) and location({_xcoord},-63,{_zcoord}): block at loop-block is not solid block below loop-block is not solid block below (block below loop-block) is solid set {_return} to location of loop-block exit loop return {_return} broadcast {_return}

image

If i remove the return part, everything's fine image

JohnHeikens commented 1 month ago

Thank you for reporting this! Of course, the return value should be recognized and it should be acknowledged in expression parsing. I think atm functions always return "unknown". Will be fixing this ASAP!