View Single Post
Author Message
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 11-29-2021 , 06:45   Declare arrays with using a variable for size
Reply With Quote #1

I use emitsoundany.inc include in my plugin.
If I build it with 1.10, there are no problems.
If I build it with 1.11, when I run the plugin I get an error in line 150:
HTML Code:
Exception reported: Tracker stack is out of bounds
I see that the array size is set to a variable, the value of which is probably not known at compile time. So if I replace this line with this:
PHP Code:
int clients[MAXPLAYERS+1]; 
There is no error when I run the plugin.
As this is allowed to use variables, can I know at compile time when an array size initialised with a variable will be giving this error?
Attached Files
File Type: zip emitsoundany.zip (1.9 KB, 47 views)

Last edited by kadet.89; 11-29-2021 at 08:30.
kadet.89 is offline
Send a message via Skype™ to kadet.89