The following script in a .molang file function will not compile correctly
for_each(v.player, q.get_nearby_entities(16, 'minecraft:player'), {
v.playerloc.x = v.player -> q.position(0);
v.playerloc.z = v.player -> q.position(2);
break;
});
Error: Cannot use context switch operator "->" on FunctionExpression
I tried changing q.position(0) and q.position(1) to q.position and it compiles correctly, but this isn't valid in Minecraft