PDA

View Full Version : Recursion


Freedom.
09/07/2017, 11:54 PM
Hey, I checked every line of gamemode but I did not find any recursion.

Header size: 18044 bytes
Code size: 1011168 bytes
Data size: 3277336 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 4322932 bytes

I am using global arrays like that.

new textstr[256];

new yazi[256],
stryazi[256],
adminSTR[256],
PlayerSTR[256],
query[512],
dialog_msg[1024],
global_str[354];

new klan_bquery[256],
klan_query[128],
klan_squery[64];


And here is my includes:

#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS (100)

#include <a_mysql>
#include <a_http>

#include <weapon-config>
#include <SKY>
#include <foreach>

#include <crashdetect>
#include <izcmd>
#include <sscanf2>
#include <streamer>
#include <mapandreas>
#include <progress2>
#include <weapondata>

#include <colors>
#include <gangzones>
#include <attachments>


Any ideas?

JasonRiggs
10/07/2017, 12:02 AM
I don't want to re-explain what they've said over here (http://forum.sa-mp.com/showthread.php?t=204111), Look at that thread, it might help you..

Freedom.
10/07/2017, 12:18 AM
I already saw this anything else?

Sew_Sumi
10/07/2017, 01:05 AM
Did you actually read it, or did you simply think it was too hard?

Mauzen had the information you should be looking at.

Freedom.
10/07/2017, 07:47 AM
I read that nothing changes

Sew_Sumi
10/07/2017, 08:46 AM
So did you do anything to fix it other than reading the thread?


Like, did you actually check your script, look at what you changed last, or anything?

C'mon, the more info you pass back the more likely someone will be enthused to help you regarding this...

Freedom.
10/07/2017, 09:25 AM
I have been scripting this game mode since 2013 I never thougth about optimization. I checked other copies they have same recursion thing. I checked every line three times and found nothing.

Sew_Sumi
10/07/2017, 10:19 AM
I have been scripting this game mode since 2013 I never thougth about optimization.

So did you make it, or did you simply start editing it?

I checked other copies they have same recursion thing.

Other copies of _what_ exactly? Other versions of what you've made?

When did it start causing the trouble that you are facing? What did you do around the time that you started having this occur.

What were you trying to fix/create when you started having this problem?

I checked every line three times and found nothing.

What were you checking for?


Like, damn, I'm sure you're simply skipping the middle of that thread that's been linked to you, finding the last post and seeing it's not accessible, and thinking it's a dead end, where the middle of the thread is the important part in the first instance.


Does your code flow? Is it easy for you to step through whilst reading it? (These are some of the first things to look at when you look at optimisation and being able to debug your code...)

Freedom.
10/07/2017, 11:06 AM
So did you make it, or did you simply start editing it?

Gamemode is made from scratch not editing.


Other copies of _what_ exactly? Other versions of what you've made?

I made major changes sometimes that's all.

When did it start causing the trouble that you are facing? What did you do around the time that you started having this occur.

What were you trying to fix/create when you started having this problem?

I never checked before so I did not know when this occur. I'll send you copy of gamemode.


What were you checking for?


Like, damn, I'm sure you're simply skipping the middle of that thread that's been linked to you, finding the last post and seeing it's not accessible, and thinking it's a dead end, where the middle of the thread is the important part in the first instance.


Does your code flow? Is it easy for you to step through whilst reading it? (These are some of the first things to look at when you look at optimisation and being able to debug your code...)


I did see optimizion thread and applied nothing changed.

Look your pm.

OneDay
10/07/2017, 01:07 PM
What is the problem?

Sew_Sumi
10/07/2017, 01:36 PM
What is the problem?

How can you not read the thread?

OneDay
10/07/2017, 01:39 PM
He said there is recursion, that is not bad, so why complaints? I read thread but see no problems (except global strings - that is problem).

Sew_Sumi
10/07/2017, 01:46 PM
(except global strings - that is problem).

Yes, that is a problem considering that the client can only display 144 chars for SendClientMessage. And having multiples of those globals makes for a _LOT_ of wasted cells.