SA-MP Forums Archive
Menu crashing server? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Menu crashing server? (/showthread.php?tid=81349)



Menu crashing server? - efeX - 10.06.2009

Well, for some reason now my menu crashes the server, it never used to before.


Global...
Код:
new Menu:CarColorMenu;
OnGameModeInit()...
Код:
CarColorMenu = CreateMenu("Car Color", 1, 200.0, 150.0, 130.0, 0.0);
AddMenuItem(CarColorMenu, 0, "Black");
AddMenuItem(CarColorMenu, 0, "White");
AddMenuItem(CarColorMenu, 0, "Blue");
AddMenuItem(CarColorMenu, 0, "Red");
AddMenuItem(CarColorMenu, 0, "Green");
AddMenuItem(CarColorMenu, 0, "Pink");
AddMenuItem(CarColorMenu, 0, "Yellow");
in my dcmd
Код:
if (GetPlayerVehicleID(playerid) == Player[playerid][cID])
	      {
	        TogglePlayerControllable(playerid, 0);
	      	ShowMenuForPlayer(CarColorMenu, playerid);
	      	return 1;
	      }
^ calls correctly, tested

OnExitedMenu
Код:
public OnPlayerExitedMenu(playerid)
{
	TogglePlayerControllable(playerid, 1);
	return 1;
}
It crashes the SERVER when i call it.. Why?



Re: Menu crashing server? - Abernethy - 10.06.2009

It really shouldn't. I'm not quite sure, It's obviously a SA:MP bug.


Re: Menu crashing server? - efeX - 10.06.2009

well that sucks..


Re: Menu crashing server? - Joe Staff - 10.06.2009

Check to see where exactly the server is crashing, put print("debugtest1") after every few functions, and then in the log you'll see how many times it shows up, then you can determine exactly where in your script the server is crashing.


Re: Menu crashing server? - efeX - 10.06.2009

well i know it's crashing when i call ShowMenuForPlayer


Re: Menu crashing server? - Andom - 10.06.2009

Well, where's your OnPlayerSelectedMenuRow?