Posts: 6
Threads: 4
Joined: Jul 2010
Reputation:
0
Firstly, hello guys.
I want to do config file for my fs like "maximum veh" etc. But this is not working.
I'm using
#define MAX_VEH dini_Int(configfile,"MAX_VEH")
this code. But this code take an error (crash).
If you know then please help me. I hope you help to me.
Posts: 2,368
Threads: 27
Joined: Jun 2010
Reputation:
0
Uhmm, can you post full MAX_VEH Script?
Posts: 6
Threads: 4
Joined: Jul 2010
Reputation:
0
for(new i = 1; i < MAX_VEH; i++)
{
........
}
Posts: 517
Threads: 22
Joined: Mar 2010
Reputation:
0
Functions are slower than constants / varibles.
I don't know, I've been through the same 'phase' for MAX_PLAYERS.
Really, just leave it as it is.
Quote Kyosaur: "Don't make assumsions"
-
If you redefine MAX_PLAYERS to 100 for example, and you forgot that it was redefined, and changed slots to 150, then your loops would be 50 iterations short.
I was thinking of ways to stop 500 iterations (MAX_PLAYERS LOOP) but really IT IS the best thing.
but when he kind of explained to me the 'IF you ever have over 1000 vehicles and you redefined them to 500' stuff.
You understand that it's best to leave it.. I mean, ofcourse it's a big loop (2000 = MAX_VEHICLES), but then you don't have to redefine in every script.
The speed results aren't that bad either.. You don't notice it ingame unless it's more than 2000 ms, and the results were WAY under that.
So to quote Kyosaur again: "Don't make assumsions"