Stack overflow: cannot resize stack while in a metamethod

EK.IceFlake

  • Hero Member
  • "We are the champions my fellahs" - Sufyan/VK.SuFy
  • Posts: 1,752
Stack overflow: cannot resize stack while in a metamethod
«  »
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?

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,803
Re: Stack overflow: cannot resize stack while in a metamethod
« Reply #1,  »
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:
Code: [Select]
# 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.
.