Menu crashing server?
#1

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?
Reply
#2

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

well that sucks..
Reply
#4

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.
Reply
#5

well i know it's crashing when i call ShowMenuForPlayer
Reply
#6

Well, where's your OnPlayerSelectedMenuRow?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)