20.01.2013, 17:12
Hello there crashdetect plugin print this code into server_log,
I was just wondering will this in example reduce stack size
This:
change to this:
I guess you all understand what I what to say... Is this good way to start optimizing script?
Code:
[18:54:31] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)" [18:54:31] [debug] Stack pointer (STK) is 0x434C28, heap pointer (HEA) is 0x434DB4
This:
pawn Code:
stock funtion1(playerid){
new mystr[64];
format(mystr, sizeof(mystr), "Example %d", 1);
}
stock funtion2(playerid){
new mystr[64];
format(mystr, sizeof(mystr), "Example %d", 2);
}
stock funtion3(playerid){
new mystr[64];
format(mystr, sizeof(mystr), "Example %d", 3);
}
pawn Code:
new mystr[MAX_PLAYERS][128];
stock funtion1(playerid){
format(mystr[playerid], 64, "Example %d", 1);
}
stock funtion2(playerid){
format(mystr[playerid], 64, "Example %d", 2);
}
stock funtion3(playerid){
format(mystr[playerid], 64, "Example %d", 3);
}