09.04.2012, 19:49
I was crashing all the time while executing this code:
This is the debug:
It was crashing because the command was "hidding" no menu at all, as I was not in any menu at that time.
pawn Code:
else if( !strcmp( cmdtext, "/dvk", true ) )
{
if( !Dvk_Arr[f] )
{
Dvk_Arr[f] = true;
SetCameraBehindPlayer( playerid );
HideMenuForPlayer( GetPlayerMenu( playerid ), playerid );
SetPlayerPos( playerid, 10.0, 10.0, 05.0 );
TogglePlayerControllable( playerid, 1 );
}
ShowPlayerDialog( playerid, 749, DIALOG_STYLE_LIST, "Select an option", "Races\nRecording\nTools", "Select", "Cancel" );
return 1;
}
Code:
[16:52:06] Number of vehicle models: 1 [16:52:10] Incoming connection: 127.0.0.1:56140 [16:52:10] [join] Player has joined the server (0:127.0.0.1) [16:52:16] RCON (In-Game): Player #0 (Player) has logged in. [16:52:21] [chat] [Player]: ffffffffaff}ff [16:52:24] [debug] Server crashed while executing DVKStreetRod.amx [16:52:24] [debug] Backtrace (most recent call first): [16:52:24] [debug] #0 ???????? in native HideMenuForPlayer () from samp-server.exe [16:52:24] [debug] #1 00000ff4 in OnPlayerCommandText () from DVKStreetRod.amx [16:52:24] [debug] Server crashed while executing DVKStreetRod.amx [16:52:24] [debug] Backtrace (most recent call first): [16:52:24] [debug] #0 ???????? in native HideMenuForPlayer () from samp-server.exe [16:52:24] [debug] #1 00000ff4 in OnPlayerCommandText () from DVKStreetRod.amx