Stack/Heap overflow due to this function
#1

pawn Код:
stock IsPlayerMuteEvader(playerid) {
    new query[128], bool:isME=false;
    format(query, sizeof(query), "SELECT `ID` FROM `temp_actions` WHERE `type` = 'mute-evade' AND (`ip` = '%s' OR `data` = '%s')",
        pData[playerid][PIP], PlayerName(playerid));
    mysql_query(query);
    mysql_store_result();
    isME = mysql_num_rows()>0;
    mysql_free_result();
    return isME;
}
Seems fine to me, yet it gives me the following error:

Код:
Header size:           7304 bytes
Code size:           475284 bytes
Data size:           492632 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:  991604 bytes
Even though there isn't any recursion going on here! Help?!
Reply
#2

It just means you're using too much memory. It's not really a problem.
You can circumvent this warning with #pragma dynamic.
Reply
#3

Are you sure that's the piece of code causing this warning?
Reply
#4

FIXED

The function works fine, the place where I called it was already using too much memory.
Reply
#5

In order to avoid that warning in the future, add this to your script:
pawn Код:
#pragma dynamic 1000000
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)