Random Server Crash
#9

Quote:
Originally Posted by Infamous
Посмотреть сообщение
After UnloadMission is called the main gamemode sends the player to the welcome screen;
PHP код:
forward SendPlayerToWelcomeScreen(playerid);
public 
SendPlayerToWelcomeScreen(playerid)
{
    
SetPVarInt(playerid"viewing_welcome_screen"1);
    
SetPlayerVirtualWorld(playerid1);
    
SpawnPlayer(playerid);
    return 
1;

That then calls OnPlayerSpawn;
PHP код:
public OnPlayerSpawn(playerid)
{
    if(
GetPVarInt(playerid"viewing_welcome_screen") == 1)
    {
        
////////////////////////////////////////////////////////////////////
        
TogglePlayerSpectating(playeridtrue);
        
ShowWelcomeScreen(playerid);
        
////////////////////////////////////////////////////////////////////
        
if(GetPVarInt(playerid"playing_audio") == 0)
        {
            
PlayAudioStreamForPlayer(playerid"http://************/mowc5nw");
            
SetPVarInt(playerid"playing_audio"1);
        }
        
////////////////////////////////////////////////////////////////////
        
if(GetPVarInt(playerid"logged_in") == 0)
        {
            
format(SQL_Querysizeof(SQL_Query), "SELECT * FROM `player_accounts` WHERE Account_Name = '%s'"EscapeText(PlayerName(playerid)));
               
mysql_function_query(SQL_ConnectionSQL_Querytrue"CheckRegistered""i"playerid);
        }
        
////////////////////////////////////////////////////////////////////
    
}
    return 
1;

I'm already logged in so the main gamemode then does nothing else. The filterscript (lobby.pwn) then takes over and checks if the player is still on the welcome screen;
PHP код:
public OnPlayerUpdate(playerid)
{
    if(
GetPVarInt(playerid"viewing_welcome_screen") == 1)
    {
        if(
GetPVarInt(playerid"viewing_team_menu") == 0)
        {
            
SendPlayerToTeamSelection(playerid);
        }
    }
    return 
1;

Then should display the team selection menu but it's crashing before this happens.

EDIT: @Kar I'm using a slightly modified version of foreach 0.4.1: http://pastebin.com/FDy6SC64
Ok, keep the correct foreach. Now try putting debug messages all over every piece of code you just explained here. Then see how much of it prints before the crash occurs. Be sure to number them like we did before. Also put debug messages in the team selection area. I've searched for other stack underflow occurrences but it seems to be a rare case. Also maybe you should try the latest y_iterate (it requires YSI though).
Reply


Messages In This Thread
Random Server Crash [Solved] - by Infamous - 23.04.2015, 01:35
Re: Random Server Crash - by Crayder - 23.04.2015, 02:12
Re: Random Server Crash - by Infamous - 23.04.2015, 02:27
Re: Random Server Crash - by Crayder - 23.04.2015, 02:45
Re: Random Server Crash - by Kar - 23.04.2015, 02:55
Re: Random Server Crash - by Infamous - 23.04.2015, 03:01
Re: Random Server Crash - by Kar - 23.04.2015, 03:08
Re: Random Server Crash - by Infamous - 23.04.2015, 03:11
Re: Random Server Crash - by Crayder - 23.04.2015, 03:52
Re: Random Server Crash - by Infamous - 23.04.2015, 04:10

Forum Jump:


Users browsing this thread: 1 Guest(s)