03.07.2016, 13:03
Well first of all regarding the pragma unused params, it actually doesnt affect anything from what I know. It just helps you get rid of warnings for example.
new myVar;
#pragma unused myVar
that would get rid of the
Regarding the other problem you head with stack/heap problem, its quite simple, reduce the size of your strings.
For example what many people do is this
The problem would be new string[256];. You ask why? Its simple, chat can support only 128 characters therefore making a string with 256 characters is useless and it just adds up to your memory. Eventually when these "un used" characters stack up they will get you the stack/heap warning.
But yeah all in all, you have to optimize your gamemode. Reduce the string sizes that you dont need etc.
new myVar;
#pragma unused myVar
that would get rid of the
PHP код:
symbol is never used: "myVar"
For example what many people do is this
PHP код:
CMD:adminchat(playerid,params[]) {
new text[128];
if(sscanf(params,"s[128]",text)) return SCM(playerid,COLOR_RED,"Usage: /adminchat [text]");
new string[256];
format(string,sizeof(string),"Admin Chat %s",text);
SendAdminMessage(string);
return 1;
}
But yeah all in all, you have to optimize your gamemode. Reduce the string sizes that you dont need etc.