Vice City: Multiplayer

Community Projects => SLC's Squirrel Plugin => Bug Reports => Topic started by: EK.IceFlake on May 12th, 2017, 08:29 AM

Title: Stack overflow: cannot resize stack while in a metamethod
Post by: EK.IceFlake on May 12th, 2017, 08:29 AM
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?
Title: Re: Stack overflow: cannot resize stack while in a metamethod
Post by: . on May 12th, 2017, 10:26 AM
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.
Title: Re: Stack overflow: cannot resize stack while in a metamethod
Post by: . on July 5th, 2018, 07:13 PM
@EK.IceFlake Fixed (most likely): https://github.com/iSLC/VCMP-SqMod/commit/f51b4968ac1567cbdf071718a7440e1f643ad2ca