Stack overflow: cannot resize stack while in a metamethod

Started by EK.IceFlake, May 12, 2017, 07:29 AM

Previous topic - Next topic

EK.IceFlake

Well I have this code: https://pastebin.com/E6uCwF4S
and it an error which it claims to be on line 50
if (player.World == this.world && player.Position.DistanceTo(this.position) < this.maxdist) withindist = true;

=>Location: NATIVE

=>Line: -1

=>Function: unknown

]

Traceback:

[

=> [1] NATIVE (-1) [unknown]

=> [2] /home/ogpbot/OGP_User_Files/es/scripts/streamer.nut (50) [unknown]

]

Which I'm guessing is due to player.Position.DistanceTo
What should I do with this?

.

Unlike the official plugin this one does allow you to adjust the stack size. However that must be done in advance in the INI file:
# Squirrel options
[Squirrel]
StackSize=2048

I'll look into this. I think I made some poor choices when returning the position and other similar values.
.

.

.