OnPlayerDisconnect (Crachdetect)
#1

Have a problem

Код:
[15:48:10] Test Serverb has logged in.
[15:48:25] [debug] Run time error 6: "Invalid instruction"
[15:48:25] [debug]  Unknown opcode 0x7800 at address 0xFFFFFFFF
[15:48:25] [debug] AMX backtrace:
[15:48:25] [debug] #0 ???????? in ?? () from UGRP.amx
[15:48:27] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[15:48:27] [debug]  Stack pointer (STK) is 0x3083C, heap pointer (HEA) is 0x30934
[15:48:27] [debug] AMX backtrace:
[15:48:27] [debug] #0 ???????? in public S@@_OnPlayerDisconnect () from UGRP.amx
[15:48:27] [debug] #1 native CallLocalFunction () [00471c30] from samp-server.exe
[15:48:27] [debug] #2 ???????? in public Itter_OnPlayerDisconnect () from UGRP.amx
[15:48:27] [debug] #3 native CallLocalFunction () [00471c30] from samp-server.exe
[15:48:27] [debug] #4 ???????? in public SSCANF_OnPlayerDisconnect () from UGRP.amx
[15:48:27] [debug] #5 native CallLocalFunction () [00471c30] from samp-server.exe
[15:48:27] [debug] #6 ???????? in public Streamer_OnPlayerDisconnect () from UGRP.amx
[15:48:27] [debug] #7 native CallLocalFunction () [00471c30] from samp-server.exe
[15:48:27] [debug] #8 ???????? in public OnPlayerDisconnect () from UGRP.amx
[15:48:27] [part] Test_Serverb has left the server (0:1)
Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(gPlayerLogged{playerid} == 1)
    {
        g_mysql_RemoveDumpFile(GetPlayerSQLId(playerid));
    	OnPlayerStatsUpdate(playerid);
		g_mysql_AccountOnline(playerid, 0);
	}
	gPlayerLogged{playerid} = 0;
	return 1;
}
Reply
#2

Try updating your SSCANF and STREAMER plugin.
Reply
#3

Now its doing only this

Код:
[16:07:10] [join] Test_Serverbbb has joined the server (0:192.168.0.100)
[16:07:13] Test Serverbbb has logged in.
[16:07:21] [debug] Run time error 6: "Invalid instruction"
[16:07:21] [debug]  Unknown opcode 0x7800 at address 0xFFFFFFFF
[16:07:21] [debug] AMX backtrace:
[16:07:21] [debug] #0 ???????? in ?? () from UGRP.amx
[16:07:25] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[16:07:25] [debug]  Stack pointer (STK) is 0x2F684, heap pointer (HEA) is 0x2F750
[16:07:25] [debug] AMX backtrace:
[16:07:25] [debug] #0 ???????? in public S@@_OnPlayerDisconnect () from UGRP.amx
[16:07:25] [debug] #1 native CallLocalFunction () [00471c30] from samp-server.exe
[16:07:25] [debug] #2 ???????? in public Itter_OnPlayerDisconnect () from UGRP.amx
[16:07:25] [debug] #3 native CallLocalFunction () [00471c30] from samp-server.exe
[16:07:25] [debug] #4 ???????? in public OnPlayerDisconnect () from UGRP.amx
[16:07:25] [part] Test_Serverbbb has left the server (0:1)
Reply
#4

pump
Reply
#5

What's in your "OnPlayerStatsUpdate(playerid);"?
It could be there is something wrong.
Reply
#6

This code

Код:
stock OnPlayerStatsUpdate(playerid) {
	if(gPlayerLogged{playerid}) {
		/*if(!GetPVarType(playerid, "TempName") && !GetPVarInt(playerid, "EventToken") && GetPVarInt(playerid, "IsInArena") == -1) {
			GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
			GetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
			PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
			PlayerInfo[playerid][pVW] = GetPlayerVirtualWorld(playerid);
			GetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
			GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPos_r]);
		}*/
		g_mysql_SaveAccount(playerid);
	}
	return 1;
}
Код:
stock g_mysql_SaveAccount(playerid)
{
	new query[4096];

	format(query, sizeof(query), "UPDATE `accounts` SET \
		`IP` = '%s', \
		`ConnectedTime` = %d, \
	    `PayDay` = %d, \
	    `Age` = %d, \
		`Sex` = %d, \
		`Registered` = %d, \
		`Level` = %d, \
		`AdminLevel` = %d, \
		`Money` = %d, \
		`pHealth` = %f, \
		`pArmor` = %f, \
		`Int` = %d, \
		`VirtualWorld` = %d, \
		`TogReports` = %d, \
		`Origin` = %d,",
		PlayerInfo[playerid][pIP],
		PlayerInfo[playerid][pReg],
		PlayerInfo[playerid][pConnectHours],
		PlayerInfo[playerid][pConnectSeconds],
		PlayerInfo[playerid][pAge],
		PlayerInfo[playerid][pSex],
		PlayerInfo[playerid][pReg],
		PlayerInfo[playerid][pLevel],
		PlayerInfo[playerid][pAdmin],
		GetPlayerCash(playerid),
		PlayerInfo[playerid][pHealth],
		PlayerInfo[playerid][pArmor],
		PlayerInfo[playerid][pInt],
		PlayerInfo[playerid][pVW],
		PlayerInfo[playerid][pTogReports],
		PlayerInfo[playerid][pOrigin]
	);
	
	format(query, sizeof(query), "%s \
		`SPos_x` = %f, \
		`SPos_y` = %f, \
		`SPos_z` = %f, \
		`SPos_r` = %f, \
		`Model` = %d, \
		`Tutorial` = %d \
		WHERE `id` = '%d'",
		query,
		PlayerInfo[playerid][pPos_x],
		PlayerInfo[playerid][pPos_y],
		PlayerInfo[playerid][pPos_z],
		PlayerInfo[playerid][pPos_r],
		PlayerInfo[playerid][pModel],
		PlayerInfo[playerid][pTut],
		GetPlayerSQLId(playerid)
	);

	mysql_function_query(MainPipeline, query, false, "OnQueryFinish", "ii", SENDDATA_THREAD, playerid);
	return 1;
}
Reply
#7

pump
Reply
#8

"if(gPlayerLogged{playerid}) "

Aren't these supposed to be square brackets? { -> [
Reply
#9

Quote:
Originally Posted by TheOriginal1337
Посмотреть сообщение
"if(gPlayerLogged{playerid}) "

Aren't these supposed to be square brackets? { -> [
No, because that is probably a packed string.

-----------------------------------------

It says insufficient stack size, because of that "new query[4096];" and the default stack size is 5000, try using "#pragma dynamic 10000" or more, it should fix this crash.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)