Jump to content
  • 0

problema server


star69

Question

Problema intalnita (descriere): Apar niste erori in server_long si cand se conecteaza un jucator cu id 9, ii apar probleme, de exemplu locul de spawn se pune la 0.0, 0.0, 0.0
Ero(area / rile) / warning-(ul / urile):

[13:05:48] [debug] Run time error 4: "Array index out of bounds"
[13:05:48] [debug]  Accessing element at index 65535 past array upper bound 999
[13:05:48] [debug] AMX backtrace:
[13:05:48] [debug] #0 0025bd60 in public cmd_report (5, 3483604) from plm.amx
[13:05:48] [debug] #1 native CallLocalFunction () from samp03svr
[13:05:48] [debug] #2 00003790 in public OnPlayerCommandText (5, 3483368) from plm.amx


Liniile de cod / sursa / script-ul(obligatoriu):

[13:05:48] [debug] Run time error 4: "Array index out of bounds"
[13:05:48] [debug]  Accessing element at index 65535 past array upper bound 999
[13:05:48] [debug] AMX backtrace:
[13:05:48] [debug] #0 0025bd60 in public cmd_report (5, 3483604) from plm.amx
[13:05:48] [debug] #1 native CallLocalFunction () from samp03svr
[13:05:48] [debug] #2 00003790 in public OnPlayerCommandText (5, 3483368) from plm.amx


Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da

nu este problema la comanda report, se intampla si la alte comenzi. Dupa ce intra 9 jucatori.

 

Edited by star69
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
COMMAND:report(playerid, params[])
{
	// Setup local variables
	new OtherPlayer, Name[24], Reason[128], Msg[128];

	// Send the command to all admins so they can see it
	SendAdminText(playerid, "/report", params);

	// Check if the player has logged in
	if (gLogged[playerid] == 1)
	{
		if(OtherPlayer == INVALID_PLAYER_ID)
    	{
			if (sscanf(params, "us[128]", OtherPlayer, Reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/report <OtherPlayer> <Your report>\"");
			else
			{
		    	// Check if that other player is logged in
		    	if (gLogged[OtherPlayer] == 1)
		    	{

					// Send the report to all admins and add the report to the report-list so admins can review it
					SendReportToAdmins(OtherPlayer, Reason);

					// Get the name of the offender
					GetPlayerName(OtherPlayer, Name, sizeof(Name));
					// Let the player know he reported the other player
					format(Msg, 128, "{00FF00}You've reported {FFFF00}%s", Name);
					SendClientMessage(playerid, 0xFFFFFFFF, Msg);
				}
				else
			    	SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}That player isn't connected");

			}
		}
		else
			SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}That player isn't connected");
	}
	else
	    return 0;

	// Let the server know that this was a valid command
	return 1;
}

 

Link to comment
Share on other sites

  • 0

incearca asa scrie report in joc si spune daca mai da run time error

 


CMD:report(playerid, params[])
{
	new OtherPlayer, Name[24], Reason[128], Msg[128];
//	SendAdminText(playerid, "/report", params); // nu stiu ce reprezinta asta....
	if (!gLogged[playerid]) return 1;
	if (sscanf(params, "us[128]", OtherPlayer, Reason)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/report <OtherPlayer> <Your report>\"");
	if(OtherPlayer == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}That player isn't connected");
   	if (!gLogged[OtherPlayer]) return 	SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}That player isn't connected");

	SendReportToAdmins(OtherPlayer, Reason);
	GetPlayerName(OtherPlayer, Name, sizeof(Name));
	format(Msg, 128, "{00FF00}You've reported {FFFF00}%s", Name);
	SendClientMessage(playerid, 0xFFFFFFFF, Msg);
	return 1;
}

 

si ce face functia SendAdminText ?

  • Upvote 1

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Trimite mesaj la admini ca a folosit comanda. 

Am rezolvat cu comanda.

Da` uneori serverul o ia razna. 

In mod obisnuit apare OnPlayerRequestClass, sa selectezi clasa. Cand o ia razna serverul nu apare si nu ii face acelui jucator SetSpawnInfo unde trebuie, il face la 0.0, 0.0, 0.0.

Am crashdetect si nu spune nimic.

Cred ca era de la comanda. Astept sa vad daca mai face asa si revin

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.