SA-MP Forums Archive
Little Question - need some tip/help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Little Question - need some tip/help (/showthread.php?tid=112886)



Little Question - need some tip/help - *ToM* - 10.12.2009

pawn Код:
Header size:      2844 bytes
Code size:      123568 bytes
Data size:      356916 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4511 cells (18044 bytes)
Total requirements: 499712 bytes
This thing pops up when I'm compiling, it's compiling well without any warnings/errors, just this shit comes up. I heard it can affect my gamemode etc, but I don't have a clue how to fix it. Is there any special define or something ? Any tip/help will be appreciated Thanks.
Or can I just leave it as it is ?


Re: Little Question - need some tip/help - Abernethy - 10.12.2009

Quote:
Originally Posted by Toniu_
pawn Код:
Header size:     2844 bytes
Code size:     123568 bytes
Data size:     356916 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4511 cells (18044 bytes)
Total requirements: 499712 bytes
This thing pops up when I'm compiling, it's compiling well without any warnings/errors, just this shit comes up. I heard it can affect my gamemode etc, but I don't have a clue how to fix it. Is there any special define or something ? Any tip/help will be appreciated Thanks.
Or can I just leave it as it is ?
Try hitting edit>replace then string[256]; with string[128]; - I removed it on a larger script by doing that, and it still worked perfectly.


Re: Little Question - need some tip/help - *ToM* - 10.12.2009

Quote:
Originally Posted by Aber▲
Try hitting edit>replace then string[256]; with string[128]; - I removed it on a larger script by doing that, and it still worked perfectly.
Ye I tried that one but didn't work out, there must be some other method to fix it


Re: Little Question - need some tip/help - Joe Staff - 11.12.2009

It just means you're using an unnecessary amount of memory in your variables and arrays. Nothing to freak out about but just keep in mind that your server is using up more resources than required.


A good way to fix this is to create global temps. By doing this you're also saving a bit of CPU usage.
instead of
pawn Код:
public OnPlayerUpdate(playerid)
{
  new tmp = GetPlayerMoney(playerid);
  GivePlayerMoney(playerid,tmp+5);
  return 1;
}
do something like this
pawn Код:
new tmp;
public OnPlayerUpdate(playerid)
{
  tmp = GetPlayerMoney(playerid);
  GivePlayerMoney(playerid,tmp+5);
  return 1;
}
That way the variable 'tmp' is being created only once.


Re: Little Question - need some tip/help - *ToM* - 11.12.2009

aiight thanks but I heard that it can affect your script like some commands won't work is it true ?