GameMode Size
#1

Okay,so my gamemode has 30.300 lines and after compiling it has 70mb, which I know is a LOT.

The .pwn file has 1,2mb.

This is what the compiler says at the end :

Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:          27836 bytes
Code size:          1872704 bytes
Data size:         286748040 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:288664964 bytes
Firstly, I'd like to ask if anyone can give advice on how to find that recursive function.
Secondly, what other things might cause this ?
Reply
#2

String sizes could be a problem.
Reply
#3

reduce string sizes like
new string[512];
to string[128];
or try deleting your includes folder and try to add new 1ns (i had the same problem when the streamer include had some bugs)
Reply
#4

Always try to use the smallest len. for strings, ****** made a thread about this issue:

https://sampforum.blast.hk/showthread.php?tid=55261
Reply
#5

I have global defined variables for these.

At the top of the script.

pawn Код:
//Global Variables for querys & format messages
new msg[256], query[500];
//Global Variables for querys & format messages
Reply
#6

That size is just INSANE. You should search the forum about optimizing your codes. Slice, ****** and Emmet_ wrote some thread(s) before, you can easily find them out.

About the recursion, you need to check where you are calling the function itself.

Best example for recursion: http://forum.sa-mp.com/showpost.php?...40&postcount=4
Reply
#7

I had a similar problem when i started a script from scratch....
I have created a variable with an enum and my the script size was about 20MB, when i find it out that i have a problem with the enum when i fixed it the size of my script has reduced to 2.8MB...

I want to say check your enums (especially if you creating an "3D" variable enum ve { array[50] }; new variable[50][ve]; )
Reply
#8

Alright,thanks for your input. I'll keep searching. Another question which might sound stupid.Can the recursion occur in Public statements and in Stocks ?
Reply
#9

Quote:
Originally Posted by rappy93
Посмотреть сообщение
Can the recursion occur in Public statements and in Stocks ?
Yes.

PS: They're functions, it's wrong to say "in Stocks".
Reply
#10

This is worrying can we see the includes you are using? YSI causes recursion but its not a problem when its used properly.

pawn Код:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:          27,836 bytes - 0.026546478 MB
Code size:          1,872,704 bytes - 1.785949707 MB
Data size:         286,748,040 bytes - 273.464241028 MB
Stack/heap size:      16,384 bytes; estimated max. usage: unknown, due to recursion - 0.015625 MB
Total requirements: 288,664,964 bytes - 275.292362213 MB
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)