Gamemode fucked?
#1

I was creating a new script and i'm very sparing if it's about arrays.

But suddenly i got this what means i used too mutch or big arrays:
Quote:

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 5224 bytes
Code size: 326408 bytes
Data size: 285636 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 633652 bytes

Which i find very strange, because i always spare and try to lower my arrays as mutch as possible.
I have another script that uses a LOT more arrays and also bigger but that one doesn't have this warning?

Anyways i was trying to run the server when it won't want to start anymore, i have lowered a lot of big arrays and it wants to turn on but the gamemode name is 'unknown' and i spawn on coordinates 0.0000, 0.0000, 0.0000 and no command and functions work anymore.

But when i looked into the log i found this error which i've never seen:
Quote:

[19:39:10] Script[gamemodes/CGRPG.amx]: Run time error 7: "Stack underflow"

What does that mean? and what does that have to do with my server suddenly doesn't working anymore?

Reply
#2

21 hour <bumb>
Reply
#3

Maybe you have too large arrays!!!!!
Reply
#4

Quote:
Originally Posted by Kurence
Maybe you have too large arrays!!!!!
That's imposible as i write in my start topic, i only use very small arrays, and it's not even close to the arrays that PEN has and that GM just works.
Reply
#5

"An error condition that occurs when an item is called for from the stack, but the stack is empty."

I don't quite understand that either, but urgh, yeah.
Reply
#6

There are buffer overflows present in your gamemode. That means you are storing information with no place to store it in, which often results in either the code halting, or strange effects where the script will try to find another place to store the data in (i.e from another variable, which will ultimately cause countless problems).

Example:

Код:
new aArray[50];

ResetArrayData()
{
  for(new i = 0; i < 52; i++)
  {
    aArray[i] = 0;  // This will overflow when the loop iterates to 50 and 51.
  }
}
There is nothing wrong with that information present in the compiler - it's just indicating that the compiled script is large. It doesn't necessarily mean there are empty or unused arrays (as some people previously, wrongly, suggested).

Revert your code back to it's previous state.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)