Crash Prob :/
#1

Код:
	if(pickupid == m4)
	{
		GivePlayerWeapon(playerid,31,500);
		SetPlayerHealth(playerid,100);
		SetPlayerPos(playerid, 30.1597,-3340.1558,540.3303);
		SendClientMessage(playerid,0x7CFC00AA,"Success: You have reached M4 You got");
        SendClientMessageToAll(COLOR_WHITE,"%s Has Reached M4");
		GivePlayerMoney(playerid, 250);
		PlayerInfo[playerid][pM4] ++;
		SetPlayerScore(playerid, GetPlayerScore(playerid)+3);
When some 1 reaches m4 he gets 3 score and +1 m4 in stats , but this is not working when some 1 reaches m4 server gets crashed
Reply
#2

Use crashdetect, and check the variable.
Reply
#3

Код:
[12:20:26] [debug] Server crashed while executing Fun.amx
[12:20:26] [debug] AMX backtrace:
[12:20:26] [debug] #0 native SendClientMessageToAll () from samp-server.exe
[12:20:26] [debug] #1 0002518c in public S@@_OnPlayerPickUpPickup (0, 1) from BaseJump2.amx
[12:20:26] [debug] #2 native CallLocalFunction () from samp-server.exe
[12:20:26] [debug] #3 00012bf4 in ?? (0, 1) from BaseJump2.amx
[12:20:26] [debug] #4 00000358 in public OnPlayerPickUpPickup (0, 1) from BaseJump2.amx
[12:20:27] [debug] Native backtrace:
[12:20:27] [debug] #0 004989ec in ?? () from samp-server.exe
[12:20:27] [debug] #1 2d0b84a6 in ?? () from samp-server.exe
[12:20:27] [debug] #2 698301e1 in ?? () from plugins\crashdetect.dll
[12:20:27] [debug] #3 77da6d0e in ?? () from C:\Windows\SYSTEM32\ntdll.dll
[12:20:27] [debug] #4 77da3470 in ?? () from C:\Windows\SYSTEM32\ntdll.dll
[12:20:27] [debug] #5 0048874e in ?? () from samp-server.exe
Reply
#4

Quote:

SendClientMessageToAll(COLOR_WHITE,"%s Has Reached M4");

^
Here is the problem.

You have to format the string (%s) before sending it to all players.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)