[HELP] SSCANF/LuxAdmin bug
#1

Problem:
Код:
[07:01:22] Incoming connection: 213.253.216.204:1653
[07:01:22] [join] dam6666 has joined the server (1:213.253.216.204)
[07:01:22] [debug] Run time error 5: "Invalid memory access"
[07:01:22] [debug] AMX backtrace:
[07:01:22] [debug] #0 000105ac in public SSCANF_OnPlayerConnect (playerid=37) at D:\Letoltesek\filterscripts\LuxAdminHUN.pwn:627
[07:01:22] [debug] #1 native CallLocalFunction () [00472260] from samp-server.exe
[07:01:22] [debug] #2 000082a8 in public Streamer_OnPlayerConnect (playerid=1) at D:\Letoltesek\samp server 0.3e\pawno\include\sscanf2.inc:114
[07:01:22] [debug] #3 native CallLocalFunction () [00472260] from samp-server.exe
[07:01:22] [debug] #4 00006fa8 in public OnPlayerConnect (playerid=1) at D:\Letoltesek\samp server 0.3e\pawno\include\streamer.inc:344
The this playerid is 1 but in sscanf show the 37 playerid and not work the OnPlayerConnect with this error :S
Please help!

(Sorry for my bad english)
Reply
#2

what's line 627 in LuxAdminHUN.pwn ?
Reply
#3

the line 627 is: new pAKA[256];

Код:
...
if(ServerInfo[ConnectMessages] == 1)
	{
	    new pAKA[256]; //line 627
		pAKA = dini_Get("LuxAdmin/Config/aka.txt",tmp3);
		if (strlen(pAKA) < 3)
		format(str,sizeof(str),"* {FF0000}%s {FFC52B}(%d) {00F2FF}csatlakozott a szerverhez! {FFBB00}[%i/%i]", PlayerName,playerid,GetPlayersOnServer(),GetMaxPlayers());
		else if (!strcmp(pAKA,PlayerName,true))
		format(str,sizeof(str),"* {FF0000}%s {FFC52B}(%d) {00F2FF}csatlakozott a szerverhez! {FFBB00}[%i/%i]", PlayerName,playerid,GetPlayersOnServer(),GetMaxPlayers());
		else format(str,sizeof(str),"* {FF0000}%s {FFC52B}(%d) {00F2FF}csatlakozott a szerverhez! {FFBB00}[%i/%i] {00F2FF}(aka %s)",PlayerName,playerid,GetPlayersOnServer(),GetMaxPlayers(),pAKA);

		for(new i = 0; i < MAX_PLAYERS; i++)
		if(IsPlayerConnected(i) && playerid != i)
		{
		if(AccInfo[i][Level] > 2)
		SendClientMessage(i,grey,str);
		else
		{
		format(string,sizeof(string),"* {FF0000}%s {FFC52B}(%d) {00F2FF}csatlakozott a szerverhez! {FFBB00}[%i/%i]", PlayerName, playerid,GetPlayersOnServer(),GetMaxPlayers());
 	    SendClientMessage(i,grey,string);
		}
		}
	}
...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)