Desync / Mysql Errors
#1

Hi there!

I have some problems with my server.

1. GM debug:

Код:
[13:08:08] [debug] Run time error 4: "Array index out of bounds"
[13:08:08] [debug]  Accessing element at index 65535 past array upper bound 999
[13:08:08] [debug] AMX backtrace:
[13:08:08] [debug] #0 0019d5ec in public globalPlayerLoop () at D:\server\gamemodes\vortex.pwn:28768
28768 line:
Код:
if(PlayerFind[x] != 999)
.

2. Mysql Error:

Код:
[16:08:16] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
and
Код:
[17:10:16] [ERROR] CMySQLQuery::Execute - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1
[17:10:16] [WARNING] cache_get_row_count - no active cache
[17:10:16] [WARNING] CMySQLHandle::DeleteSavedResult - invalid result id ('0')
3. Desync problem. When i have more than 35 players online, they will not see the textdraws, moneybar is not working properly and some players will have desyncronization. I don't know why.. And if i will be in a area with a lot of players we will have a high ping. Some reasons for that? ( i have defined maX_players to 1000 in a_samp.inc, not in gm)

Please, help me.
Reply
#2

PHP код:
//more ?
if(PlayerFind[x] != 999)
//more ? 
Reply
#3

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
PHP код:
//more ?
if(PlayerFind[x] != 999)
//more ? 
Код:
if(FindTime[x] == 1)
		{
			if(PlayerFind[x] != 999)
			{
				new target;
	            target = PlayerFind[x];
		        if(InBizz[target] != 0)
		        {
		            CP[x] = 385;
	    	    PlayerData[x][pCheckpoint] = 0;
		        	SetPlayerCheckpoint(x, businessVariables[InBizz[target]][bExteriorPos][0], businessVariables[InBizz[tinta]][bExteriorPos][1], businessVariables[InBizz[target]][bExteriorPos][2], 7);
		        }
		        if(InHouse[target] != 0)
		        {
		            CP[x] = 385;
	    	    PlayerData[x][pCheckpoint] = 0;
		        	SetPlayerCheckpoint(x, houseVariables[InHouse[target]][hHouseExteriorPos][0], houseVariables[InHouse[target]][hHouseExteriorPos][1], houseVariables[InHouse[target]][hHouseExteriorPos][2], 7);
		        }
		        if(InHQ[target] != 0)
		        {
		            CP[x] = 385;
	    	    PlayerData[x][pCheckpoint] = 0;
		        	SetPlayerCheckpoint(x, groupVariables[InHQ[target]][gGroupExteriorPos][0], groupVariables[InHQ[target]][gGroupExteriorPos][1], groupVariables[InHQ[target]][gGroupExteriorPos][2], 7);
		        }
		        if(InHQ[target] != 0 && InHouse[target] != 0 && InBizz[target] != 0)
		        {
		        	new Float: xf, Float: y, Float: z;
		       		GetPlayerPos(target,xf,y,z);
		        	SetPlayerCheckpoint(x,xf,y,z,3.0);
		        	InHQ[target] = 0;
		        	InHouse[target] = 0;
		        	InBizz[target] = 0;
		        	CP[x] = 385;
	    	    PlayerData[x][pCheckpoint] = 0;
		        }
			}
		}
Reply
#4

what values can take 'x'
Reply
#5

"index 65535" is nearly always caused by not properly checking the input value for INVALID_PLAYER_ID or INVALID_VEHICLE_ID before using the value in an array. Most notably in OnPlayerDeath.

Furtherore, using 999, 255, -1 or any other arbitrary value to indicate an invalid value is bad practice. Even more so since 999 can in fact be a valid playerid. Always use INVALID_PLAYER_ID or INVALID_VEHICLE_ID where appropriate.
Reply
#6

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
what values can take 'x'
A player id. Actually, i am using x like foreach(Player , x).
Reply
#7

BUMP
Reply
#8

BUMP
Reply
#9

Sorry was seeing three topics with the same subject Mysql, and ended up putting the wrong subject.
Reply
#10

Quote:
Originally Posted by Danzou
Посмотреть сообщение
libmysql.dll
What does it mean?
I must to use libmysql.so plugin?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)