Run time error 3: "Stack/heap collision (insufficient stack size)"
#1

Hi, I've implemented a new function in to my code today. When I join IG and show the dialog that uses the function it keeps printing that it's using too much memory... or I've ran out? Can someone tell me what to do? I'm willing to do anything to fix this problem as i've spent a lot of time creating the gamemode

Error report:
Код:
[41:14:21] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[41:14:21] [debug]  Stack pointer (STK) is 0x34E5EC0, heap pointer (HEA) is 0x34E5E98
[41:14:21] [debug] AMX backtrace:
[41:14:21] [debug] #0 0001c4e4 in NoUnderscore (string[]=@00602c34 "Miguel_Oliveira") at ./assets/functions.pwn:1727
[41:14:21] [debug] #1 0009156c in ShowDialog (playerid=0, dialogid=192, extra=20, extraEx=-1) at ./assets/OnDialogResponse.pwn:262
[41:14:21] [debug] #2 000ba4b4 in public OnDialogResponse (playerid=0, dialogid=190, response=1, listitem=10, inputtext[]=@034e5a14 "Vodafone Phone Supplies - Auction") at ./assets/OnDialogResponse.pwn:2923
Compiler output:
Код:
Header size:          17412 bytes
Code size:          1424172 bytes
Data size:         55466516 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:56924484 bytes
Function:
PHP код:
stock NoUnderscore(string[])
{
    new 
str[MAX_STRING];
    
strmid(strstring0strlen(string), MAX_STRING);
    for(new 
arr 0arr strlen(str); arr++)
    {
        if(
str[arr] == '_'str[arr] = ' ';
    }
    return 
str;
}
format(iFormatsizeof(iFormat), "Business owner: %s"NoUnderscore(BusinessInfo[bizID][bOwner])); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)