25 players, otherwise script freaks out. - 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: 25 players, otherwise script freaks out. (
/showthread.php?tid=264700)
25 players, otherwise script freaks out. -
freshOrange - 27.06.2011
I have encountered a serious problem, as soon as server reaches 25 players, registration and login system freaks out.
Any advices?
Re: 25 players, otherwise script freaks out. -
WooTFTW - 27.06.2011
Show us login/register code. And make sure MAX_PLAYERS isn't set to 25.
Re: 25 players, otherwise script freaks out. -
freshOrange - 27.06.2011
MAX_PLAYERS is set to 300.
#define SCRIPT_MAXPLAYERS 300 // Max Players.
Re: 25 players, otherwise script freaks out. -
alpha500delta - 27.06.2011
Or you can do
pawn Код:
#undef MAX_PLAYERS
#define MAX_PLAYERS 300
Instead of that code...
Re: 25 players, otherwise script freaks out. -
freshOrange - 27.06.2011
Anything else?
Re: 25 players, otherwise script freaks out. -
WooTFTW - 27.06.2011
Quote:
Originally Posted by freshOrange
Anything else?
|
Show us the code.
Does everything work fine except login/registration? If nothing is working, you have exceeded array size.
like:
pawn Код:
new array[4];
array[5] ++ ; // this will exceed array size
or
#define MAX_PLAYERS 100
new bool:IsSpawned[MAX_PLAYERS];
playerid = 101;
IsSpawned[playerid] = true; // this will exceed array size
I hope you get the idea
Re: 25 players, otherwise script freaks out. -
freshOrange - 27.06.2011
Everything is completely fine, once server reaches 25th+ player, registration and login isn't able for him.
Re: 25 players, otherwise script freaks out. -
WooTFTW - 27.06.2011
Quote:
Originally Posted by freshOrange
Everything is completely fine, once server reaches 25th+ player, registration and login isn't able for him.
|
show us the code, we can't help you without the code.
Re: 25 players, otherwise script freaks out. -
freshOrange - 27.06.2011
http://pastebin.com/s2QXS7su
There's nothing wrong...
Re: 25 players, otherwise script freaks out. -
Vince - 27.06.2011
People should seriously consider optimizing their code and stepping away from old methods like dini. Try Y_Ini or DJSON instead.