Could this idea work out
#1

So, since my scipt is getting bigger and bigger, now its compiling over 1 min, so now I started to think about one idea how to reduce that time, yes Im going to optimize string lenghts etc, just that would save me only some 10 secs, so here comes my idea

what about make FS where I make like

new PlayerVar[MAX_PLAYERS];
new PlayerVar2[MAX_PLAYERS];

and so on


And in Main Gamemode just use CallRemoteFunction to write data in these variables.

in FS it could look like this
pawn Код:
new PV[MAX_PLAYERS];


SetVar(playerid,value)
{
PV[playerid] = value;
}

GetVar(playerid)
{
return PV[playerid];
}
and in Gamemode
pawn Код:
CallRemoteFunction("SetVar","ii",playerid,value);
and
MyValue = CallRemoteFunction("GetVar","i",playerid);
So my question is will this slow down proccesing time?

And no I dont want start to use PVars
Reply
#2

have you make this

#undef MAX_PLAYERS
#define MAX_PLAYERS Your max players

you can get more faster compiling
Reply
#3

That is already done, I have redefined to 75, but still, I have over some 300 per player variables
Reply
#4

Quote:
Originally Posted by Voldemort
Посмотреть сообщение
just use CallRemoteFunction to write data in these variables.
No, just no. CallRemoteFunction is the slowest function ever.

Quote:
Originally Posted by ******
Different language features take different times to execute, in general the order is (from fastest to slowest):

Nothing
Constants
Variables
Arrays
Native functions
Custom functions
Remote functions
Reply
#5

I rly dont want to know why people need that many player based variables

Quote:
Originally Posted by Voldemort
Посмотреть сообщение
And no I dont want start to use PVars
Why not?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)